kv/RocksDBStore: always release column family handles#35811
Merged
tchaikov merged 6 commits intoceph:masterfrom Jul 1, 2020
Merged
kv/RocksDBStore: always release column family handles#35811tchaikov merged 6 commits intoceph:masterfrom
tchaikov merged 6 commits intoceph:masterfrom
Conversation
Signed-off-by: Kefu Chai <kchai@redhat.com>
for better readability Signed-off-by: Kefu Chai <kchai@redhat.com>
for better readablity Signed-off-by: Kefu Chai <kchai@redhat.com>
instead of using two vectors, use a map for tracking names and handles of column families. Signed-off-by: Kefu Chai <kchai@redhat.com>
to avoid leak in ColumnFamilySet Fixes: https://tracker.ceph.com/issues/46054 Signed-off-by: Kefu Chai <kchai@redhat.com>
to make sure that the handles are released before db is deleted Fixes: https://tracker.ceph.com/issues/46054 Signed-off-by: Kefu Chai <kchai@redhat.com>
Contributor
Author
aclamk
reviewed
Jun 29, 2020
| if (!status.ok()) { | ||
| if (auto status = rocksdb::WriteStringToFile(env, new_sharding, | ||
| sharding_def_file, true); | ||
| !status.ok()) { |
Contributor
There was a problem hiding this comment.
Since status is local, maybe just !rocksdb::Write...(...).ok() ?
Contributor
Author
There was a problem hiding this comment.
@aclamk thanks for your review Adam! i will implement your suggestion in a follow up PR. as some rados suites are failing due to this issue, i am going to merge it as it is.
aclamk
reviewed
Jun 29, 2020
| using cf_deleter_t = std::function<void(rocksdb::ColumnFamilyHandle*)>; | ||
| using columns_t = std::map<std::string, | ||
| std::unique_ptr<rocksdb::ColumnFamilyHandle, | ||
| cf_deleter_t>>; |
Contributor
There was a problem hiding this comment.
Love that you merged names & handles together.
aclamk
reviewed
Jun 29, 2020
| return r; | ||
| if (bat.Count() > 0) { | ||
| flush_batch(&bat); | ||
| } |
Contributor
There was a problem hiding this comment.
Nice catch, previously even empty batch was submitted.
Contributor
Author
|
jenkins test dashboard backend |
3 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox