select nextval ('hsearch_outbox_event_generator ') performs very slowly on CockroachDB,why not use UUID
Description
is duplicated by
is followed up by
Activity

Yoann Rodière October 13, 2022 at 8:30 AM
No, it is already present in 6.1.
But as I said, it’s also completely unsupported, so it’s also undocumented. At best it’s a workaround until we fix / .
See org.hibernate.search.mapper.orm.coordination.outboxpolling.cfg.spi.HibernateOrmMapperOutboxPollingSpiSettings#OUTBOXEVENT_ENTITY_MAPPING
, i.e. the configuration property hibernate.search.coordination.outboxevent.entity.mapping
. It’s used internally here, if that helps

Yasin Koyuncu October 13, 2022 at 7:33 AM
I am assuming this is in the latest alpha version? If so can you point me to it?
Thx,
Yasin

Yoann Rodière October 12, 2022 at 9:48 AM
Yes, I already saw those configurations, however it is limited and does not allow me to change this sequence configuration.
How so? You can pass the whole XML mapping!
I’m not talking about the properties that allow customizing table and sequence names. That’s a completely different one.
But maybe this solution using UUID s could be the solution without polluting configuration options.
Glad you feel that way; I’d rather use one solution for everyone, if it works.

Yasin Koyuncu October 12, 2022 at 9:20 AM
Yes, I already saw those configurations, however it is limited and does not allow me to change this sequence configuration. But maybe this solution using UUID s could be the solution without polluting configuration options.

Yoann Rodière October 12, 2022 at 9:05 AM
we can use the jpa annotations
That’s not an option, as Hibernate Search needs to be able to add that entity to the Hibernate ORM mapping conditionally depending on settings.
Believe me, we’re not using XML mapping because we like it It’s just the only solution for dynamic mapping (yes, it’s dynamic).
Also, I don’t really want to expose these entity types as API, because that will get in the way of future evolutions. There’s a middle ground to be found between flexibility for Hibernate Search users and flexibility for Hibernate Search developers.
You can already change the XML mapping yourself if you want, through configuration properties. Though that’s completely unsupported and could break at any time: see org.hibernate.search.mapper.orm.coordination.outboxpolling.cfg.spi.HibernateOrmMapperOutboxPollingSpiSettings#OUTBOXEVENT_ENTITY_MAPPING
.
Assignee
Reporter

select nextval ('HSEARCH_OUTBOX_EVENT_GENERATOR')
is very poor performance forCockroachDB
!Can change
hsearch_outbox_event
Table`s ID from long toUUID type?
like this: