Since snapshot is created by the background commit thread, index inversion can happen if user explicitly calls manual creation API. In that case, the backgroudn thread will create a snapshot on an index that is older than the latest snapshot, which should not happen.
To avoid such a case, added a logic to check the request commit index and the latest snapshot's index.
Since snapshot is created by the background commit thread, index inversion can happen if user explicitly calls manual creation API. In that case, the backgroudn thread will create a snapshot on an index that is older than the latest snapshot, which should not happen.
To avoid such a case, added a logic to check the request commit index and the latest snapshot's index.