Destructor of ColumnFamilyData should be called only when Unref() returns true #1178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Encountered a bug in a 2-process scenario, where writer opens
the DB in write mode and reader opens in "OpenForReadOnly"
The writer process was creating a column family and dropping it
The reader process was reading the column family, but when
it decided to close the DB handle, it would crash because
the delete of the "cfd" in the ColumnFamilySet was being
done without checking if the ColumnFamilyData::Unref()
has returned true
Test Plan: I can't find any 2-process tests in the repository.
Ran "make check" on changes. There is one failure
in "SpatialDBTest.FeatureSetSerializeTest" which appears
unrelated.
Error output is as follows
utilities/spatialdb/spatial_db_test.cc:99: Failure
Value of: !deserialized.Deserialize(serialized)
Actual: false
Expected: true