hiero-ledger / hiero-ledger/hiero-consensus-node
Make Consensus Services WritableTopicStore WritableKVState Key to be comparable.
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
Added TopicIdComparator to impose a deterministic ordering on collections of TopicID objects in WritableTopicStore.
Changed WritableKVStateBase constructor to take Comparator as a parameter to create a TreeMap for modifications to enforce the order of the Key. Updated all the related Writable/Readable classes for the related changes.
Added unit tests and updated all the unit tests.
Created issue #10531, #10532 when all services have made their WritableStore WritableKVState Key comparable
Discussed this at Jan 9th modularization call, don't pass in comparator, use PBJ Comparable ID as SortedMap key for WritableKVStateBase.modifications. This has to wait for PBJ Key to implement Comparable.
Contributor guide
Assessment
This issue has not been assessed yet.