-
Type: Task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 7.3
-
Fix Version/s: 7.4
-
Component/s: Audit, Elasticsearch, Nuxeo Drive, UIDSequencer
-
Impact type:API change
-
Upgrade notes:
-
Sprint:Drive August, Drive
-
Story Points:2
1/ About the elasticsearch-uidgen-sequencer-contrib.xml contribution:
<extension target="org.nuxeo.ecm.platform.uidgen.service.UIDGeneratorService" point="sequencers"> <sequencer name="esSequencer" class="org.nuxeo.elasticsearch.seqgen.ESUIDSequencer"></sequencer> </extension>
we should make the sequencer name be used as the related Elasticsearch index name to avoid having a bad binding like it was the case for NXP-17422.
To ensure the index has well been defined we could make the ESUIDSequencer fail if such an index doesn't exist.
2/ The ESAuditBackend should use the default sequencer, not the "esSequencer" (ESUIDSequencer#SEQUENCER_CONTRIB) hardcoded one.
This way one could use a Redis sequencer (see NXP-17306) instead.
Doing so should be easy by defining ESUIDSequencer as the default sequencer with:
<extension target="org.nuxeo.ecm.platform.uidgen.service.UIDGeneratorService" point="sequencers"> <sequencer name="esSequencer" default="true" class="org.nuxeo.elasticsearch.seqgen.ESUIDSequencer"></sequencer> </extension>
and using
UIDSequencer seq = uidGeneratorService.getSequencer();
in ESAuditBackend.
3/ The Elasticsearch index name used by ESAuditBackend should be configurable.
Instead of using hardcoded "audit" (ESAuditBackend#IDX_NAME) we could use something like
<extension target="org.nuxeo.ecm.platform.audit.service.NXAuditEventsService" point="backend"> <backend class="org.nuxeo.elasticsearch.audit.ESAuditBackend"> <paramaters> <parameter name="index">audit</parameter> </paramaters> </backend> </extension>
This should allow to have several Nuxeo instances using the same Elasticsearch cluster.