Subtask #2758
Feature #2611: mon: Single-Paxos
Subtask #2621: mon: Single-Paxos: synchronize the MonitorDBStore of oblivious monitor
Subtask #2739: mon: Single-Paxos: Sync: Synchronize the store of a drifted monitor
mon: Single-Paxos: Sync: Extend the in-memory mock-up of KeyValueDB to support the safe iterator
100%
Description
Extend the in-memory mock-up of KeyValueDB to support the safe iterator, and create an iterator to iterate over all the keys of the in-memory db despite the prefix.
History
#1 Updated by Joao Eduardo Luis over 10 years ago
- Status changed from New to Fix Under Review
- % Done changed from 0 to 100
- translation missing: en.field_remaining_hours set to 2.0
From Task #2756:
- We changed KeyValueDB:
- Added a Whole-space iterator interface
- Implemented the prefix-based iterator in terms of the Whole-space iterator interface
- Added a virtual abstract get_iterator() function
- Added a virtual abstract get_readonly_iterator() function
- Implemented the prefix-based get functions for both the iterator and the read-only iterator in terms of the new functions
- We changed LevelDBStore:
- Implemented KeyValueDB's Whole-space iterator interface
- Implemented a read-only iterator based on the Whole-space iterator interface
- Added the getters for both the whole-space iterator and the whole-space read-only iterator
We did basically the same done for KeyValueDBMemory as it was done for LevelDBStore in Task #2756.
Both classes (KeyValueDBMemory and LevelDBStore) were tested using the existing tests (test_object_map and test_keyvaluedb_atomicity); furthermore, a new test (test_keyvaluedb_iterators) was created to test the iterator behavior when keys are removed while iterating the store -- in this regard, only the in-memory mock appears to have problems, and that's due to STL's map iterator behavior.
#2 Updated by Joao Eduardo Luis over 10 years ago
- Status changed from Fix Under Review to Resolved