Configuring Sequence Generation

You have the following different variants to influence the sequence generation:

Using the Default Sequence Generator

The Default Sequence Generator is the standard sequence generator used by IPP with a cache size of 100 sequences. This can be changed with property Carnot.Engine.Tuning.SequenceBatchSize, which you can set in your carnot.properties file.

Carnot.Engine.Tuning.SequenceBatchSize = 100

The sequence cache of the Default Sequence Generator is a cache per table and JVM. The cache can be increased but should not be increased too much, since gathering sequences is an expensive operation where the costs are driven by the size of the cache. It is recommended to go beyond 500. The benefit of the Default Sequence Generator is that you donít have to change the sequence definition. Sequences would still be incremented by 1. Also, the cache is JVM global, which means you are not loosing sequences unless you donít restart the server.

Using the Fast Caching Sequence Generator

The Fast Caching Sequence Generator is mainly used for pure straight through processing, as described in section Configure Fast Caching Sequence Generators in chapter Tuning for low Latency and high Throughput. Hereby sequences are cached per table and thread. The gathering process is very efficient. However in that case it would be required to change the sequence definition accordingly. If the batch size is 1000 the sequences need to be prepared to be incremented by 1000. The drawback of the Fast Caching Sequence Generator is that you have to change the sequence definition and that you can lose many sequences in case threads are released from thread pools or the server is restarted.

Using Custom Sequence Generators

It is also possible to implement a custom sequence generation strategy which could be a mix of the Default Sequence Generator and the Fast Caching Sequence Generator. That way you can tailor the behavior to your custom use cases.

The sequence generator to be used can be set via the property AuditTrail.SequenceGenerator in the server-side carnot.properties file.