Description
Motivation
A method DistributionZonesTestUtil#deployWatchesAndUpdateMetaStorageRevision is used in tests related to a distribution zone manager to increase a meta storage applied revision before distribution manager starts. The method breaks invariant: zone manager must be started before metaStorageManager.deployWatches() is invoked. Need to do proper solution for increasing the applied revision.
The first approach to fix it is to invoke methods in this order
vaultManager.put(new ByteArray("applied_revision"), longToBytes(1)).get(); metaStorageManager.start(); distributionZoneManager.start(); metaStorageManager.deployWatches();
First we put applied_revision. Then start metaStorageManager and metaStorageManager. Then deploy watches.
The disadvantage of this method is that th ByteArray("applied_revision") is an internal part of the implementation.
The second way is a restart all of the components used in the test to simulate the node restart. In this case, after the zones manager's restart, the revision will be greater than zero.
Definition of Done
The deployWatchesAndUpdateMetaStorageRevision is replaced by proper solution. Need to try approach with restart of all components.
Attachments
Issue Links
- is a child of
-
IGNITE-17924 Core distributions zones functionality.
- Open
- is fixed by
-
IGNITE-20058 NPE in DistributionZoneManagerAlterFilterTest#testAlterFilter
- Resolved