You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "DaveTeng0 (via GitHub)" <gi...@apache.org> on 2023/03/08 23:44:51 UTC
[GitHub] [ozone] DaveTeng0 opened a new pull request, #4366: HDDS-8120 Close rocksDB connection after SstFilteringTask finishes
DaveTeng0 opened a new pull request, #4366:
URL: https://github.com/apache/ozone/pull/4366
## What changes were proposed in this pull request?
Close rocksDB connection after SstFilteringTask finishes.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8120
## How was this patch tested?
Tested in dev cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on a diff in pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #4366:
URL: https://github.com/apache/ozone/pull/4366#discussion_r1131507542
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -148,6 +148,7 @@ public BackgroundTaskResult call() throws Exception {
dbName, true);
RocksDatabase db = rdbStore.getDb();
db.deleteFilesNotMatchingPrefix(prefixPairs, filterFunction);
+ rdbStore.close();
Review Comment:
Use try-with-resources to ensure close happens even in face of exceptions.
```java
try (RDBStore rdbStore = (RDBStore) OmMetadataManagerImpl
.loadDB(ozoneManager.getConfiguration(), new File(snapshotDir),
dbName, true)) {
RocksDatabase db = rdbStore.getDb();
db.deleteFilesNotMatchingPrefix(prefixPairs, filterFunction);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] smengcl commented on a diff in pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #4366:
URL: https://github.com/apache/ozone/pull/4366#discussion_r1132798855
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -148,6 +148,7 @@ public BackgroundTaskResult call() throws Exception {
dbName, true);
RocksDatabase db = rdbStore.getDb();
db.deleteFilesNotMatchingPrefix(prefixPairs, filterFunction);
+ rdbStore.close();
Review Comment:
Good catch. @DaveTeng0 Would you post another PR to address this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4366:
URL: https://github.com/apache/ozone/pull/4366#issuecomment-1462663655
Please pay attention when merging PRs. If it has a single commit, GitHub uses the commit's message by default, not the PR title.
```
Author: DaveTeng0 <10...@users.noreply.github.com>
AuthorDate: Thu Mar 9 11:28:26 2023 -0800
Commit: GitHub <no...@github.com>
CommitDate: Thu Mar 9 11:28:26 2023 -0800
close db connection (#4366)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] prashantpogde commented on pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "prashantpogde (via GitHub)" <gi...@apache.org>.
prashantpogde commented on PR #4366:
URL: https://github.com/apache/ozone/pull/4366#issuecomment-1462650867
thank you @DaveTeng0 for thsi patch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] prashantpogde commented on pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "prashantpogde (via GitHub)" <gi...@apache.org>.
prashantpogde commented on PR #4366:
URL: https://github.com/apache/ozone/pull/4366#issuecomment-1461222051
Since we are opening snapshot rocksDB instance in RW mode, we need to make sure that auto-compaction is turned off. I have filed https://issues.apache.org/jira/browse/HDDS-8122 to track this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] prashantpogde merged pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "prashantpogde (via GitHub)" <gi...@apache.org>.
prashantpogde merged PR #4366:
URL: https://github.com/apache/ozone/pull/4366
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] DaveTeng0 commented on a diff in pull request #4366: HDDS-8120. [Snapshot] Close rocksDB connection after SstFilteringTask finishes
Posted by "DaveTeng0 (via GitHub)" <gi...@apache.org>.
DaveTeng0 commented on code in PR #4366:
URL: https://github.com/apache/ozone/pull/4366#discussion_r1134443540
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/SstFilteringService.java:
##########
@@ -148,6 +148,7 @@ public BackgroundTaskResult call() throws Exception {
dbName, true);
RocksDatabase db = rdbStore.getDb();
db.deleteFilesNotMatchingPrefix(prefixPairs, filterFunction);
+ rdbStore.close();
Review Comment:
good catch! yeah i'll do that!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org