forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
effective_replication_map: erase from factory when destroyed
The effective_replication_map_factory keeps nakes pointers to outstanding effective_replication_map:s. These are kept valid using a shared effective_replication_map_ptr. When the last shared ptr reference is dropped the effective_replication_map object is destroyed, therefore the raw pointer to it in the factory must be erased. This now happens in ~effective_replication_map when the object is marked as registered. Registration happens when effective_replication_map_factory inserts the newly created effective_replication_map to its _replication_maps map, and the factory calles effective_replication_map::set_factory.. Note that effective_replication_map may be created temporarily and not be inserted to the factory's map, therefore erase is called only when required. Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters