You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the current implementation of KVStates is a dedicated VirtualMap, it is straightforward to implement Store.size() methods like this one as here:
@Override
public long sizeOfState() {
return tokenState.size();
}
As all state is consolidated into one VirtualMap (aka MegaMap), the effort of preserving the OnDiskKVState.size() method will no longer be a good cost/benefit ratio. This means Stores need a new implementation of their e.g. sizeOfState() methods.
Switch StoreMetrics.updateCount() callbacks to be done by a StateChangeListener with stateTypes() == Set.of(SINGLETON) instead of in OnDiskWritableKVState.
Consolidate to use only one EntityType in com.hedera.node.app.spi.validation. Change all uses of com.hedera.node.config.types.EntityType to use com.hedera.node.app.spi.validation.EntityType
Testing
Unit tests
Load a state and validate the counts are correctly updating in Entity_Counts map
All existing tests should pass
The text was updated successfully, but these errors were encountered:
Problem
Because the current implementation of
KVState
s is a dedicatedVirtualMap
, it is straightforward to implementStore.size()
methods like this one as here:As all state is consolidated into one
VirtualMap
(aka MegaMap), the effort of preserving theOnDiskKVState.size()
method will no longer be a good cost/benefit ratio. This meansStore
s need a new implementation of their e.g.sizeOfState()
methods.Solution
ENTITY_COUNTS
and add a post upgrade step to update this state #17427Store.sizeOfState()
#17435KVState.remove()
is called #17466StoreMetrics.updateCount()
callbacks to be done by aStateChangeListener
withstateTypes() == Set.of(SINGLETON)
instead of inOnDiskWritableKVState
.EntityType
incom.hedera.node.app.spi.validation
. Change all uses ofcom.hedera.node.config.types.EntityType
to usecom.hedera.node.app.spi.validation.EntityType
Testing
Entity_Counts
mapThe text was updated successfully, but these errors were encountered: