Up to now, under an heavy load, we need to wait that the max-volatile-size is reached, to see our updates in all the cluster nodes. unfortunately for an end-user, it is really annoying because he has no idea when he will be able to see his updates. The idea is to be able to flush the Volatile Index after a certain amount of time (this value can be configured) even during an heavy load. This way when a user stores a document if the value has been set to 1 minute, he knows that after at worse 1 minute, he will be able to find his document.
The idea could be to store the current time once the volatile index gets dirty for the first time and check in the checkVolatileCommit method that the time elapsed doesn't exceed the timeout, if it exceeds we flush the volatile index