Description
Rationale
Currently, when the get operation is performed on the snapshot of the property store, the maximum number of layers traversed by the snapshot impl is 20 times. The idea of optimization is that when a snapshot commits, it integrates the full data of the previous snapshot with the incremental data of the current snapshot so that the latest snapshot at the time of commit has the full data. In this way, during the get operation of the property store, the number of layers traversed by the snapshot will be less than or equal to 2 times.
Why should this feature exist?
Improve property store query performance and increase TPS.
Implementation
During initialization, the full data of the snapshotroot is merged into the next snapshot. When the snapshot commits, the incremental data of the current snapshot is merged with the full data in the previous snapshot.
After optimization, when the property store performs a get operation, the value can be found from the incremental data of the snapshot and the full data in the previous snapshot, so that the value can be obtained by traversing at most 2 times. Before the optimization, it needs to traverse up to 20 times to get the value. After optimization, the property store query performance is improved, thereby improving TPS.