You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "VenuReddy2103 (via GitHub)" <gi...@apache.org> on 2026/03/31 14:36:26 UTC
[PR] HIVE-29528: Managed database directory not deleted after DROP DATABASE when hive.acid.lockless.reads.enabled is true [hive]
VenuReddy2103 opened a new pull request, #6397:
URL: https://github.com/apache/hive/pull/6397
### What changes were proposed in this pull request?
After the cleaner thread finishes deleting ACID table data and directories, the parent managed database directory is also evaluated for cleanup. If the database directory is empty, it is deleted as part of the cleanup process.
### Why are the changes needed?
When soft delete is enabled, orphaned database directories remaining indefinitely in the filesystem, leading to potential storage bloat and inconsistencies between HMS metadata and filesystem state.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Tested manually
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130683823
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ if (FileUtils.isDirEmpty(fs, databasePath)) {
Review Comment:
if (!FileUtils.isDirEmpty(fs, databasePath)) {
return;
}
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4165387171
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3028401426
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +129,24 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ for (FileStatus status : fs.listStatus(databasePath)) {
+ if (status.isDirectory() &&
+ status.getPath().getName().matches("(.*)" + AcidConstants.SOFT_DELETE_TABLE_PATTERN)) {
Review Comment:
Have tried to be safe ensuring that we have atleast one softdelete table directory still exists. In case if some other files are directly created under managed database directory going forward.
Have modified it now to use FileUtils.isDirEmpty(fs, path) as you suggest.
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/entities/CompactionInfo.java:
##########
@@ -368,4 +370,12 @@ public void setWriteIds(boolean hasUncompactedAborts, Set<Long> writeIds) {
public boolean isAbortedTxnCleanup() {
return type == CompactionType.ABORT_TXN_CLEANUP;
}
+
+ public boolean isSoftDelete() {
+ return "true".equalsIgnoreCase(getProperty(hive_metastoreConstants.SOFT_DELETE_DATABASE));
Review Comment:
done. Have modified this method for operation comment.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3028401811
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/entities/CompactionInfo.java:
##########
@@ -368,4 +370,12 @@ public void setWriteIds(boolean hasUncompactedAborts, Set<Long> writeIds) {
public boolean isAbortedTxnCleanup() {
return type == CompactionType.ABORT_TXN_CLEANUP;
}
+
+ public boolean isSoftDelete() {
+ return "true".equalsIgnoreCase(getProperty(hive_metastoreConstants.SOFT_DELETE_DATABASE));
Review Comment:
done. Have refactored the code.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130964396
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ if (FileUtils.isDirEmpty(fs, databasePath)) {
Review Comment:
done
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4181895403
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023830299
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
idk, in another pr you have SOFT_DELETE_TABLE
maybe
````
soft_delete:{true,false}
comand:{drop_database, drop_table}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3028402961
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
Not setting this property to CQ_TBLPROPERTIES now as per comment in another PR - https://github.com/apache/hive/pull/6399#discussion_r3023744344
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4213676103
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [13 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023788095
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CleanupRequest.java:
##########
@@ -74,6 +86,8 @@ public static class CleanupRequestBuilder {
private String location;
private List<Path> obsoleteDirs;
private boolean purge;
+ private boolean isSoftDelete;
+ private boolean sourceOfReplication;
Review Comment:
isSourceOfReplication ?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023830299
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
in another pr you have SOFT_DELETE_TABLE, maybe
````
soft_delete: {true,false}
command: {drop_database, drop_table}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4215687394
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023830299
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
in another pr you have SOFT_DELETE_TABLE, maybe simply
````
operation: {drop_database, drop_table}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4262756168
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ merged PR #6397:
URL: https://github.com/apache/hive/pull/6397
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023799998
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +129,24 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ for (FileStatus status : fs.listStatus(databasePath)) {
+ if (status.isDirectory() &&
+ status.getPath().getName().matches("(.*)" + AcidConstants.SOFT_DELETE_TABLE_PATTERN)) {
Review Comment:
could you please explain this check?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3028399071
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CleanupRequest.java:
##########
@@ -74,6 +86,8 @@ public static class CleanupRequestBuilder {
private String location;
private List<Path> obsoleteDirs;
private boolean purge;
+ private boolean isSoftDelete;
+ private boolean sourceOfReplication;
Review Comment:
Have changed `isSoftDelete` to `softDelete` now to keep the naming convention consistent with existing `purge` field
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "nrg4878 (via GitHub)" <gi...@apache.org>.
nrg4878 commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4290348317
@deniskuzZ Can we please get another review on this now that PR 6399 is merged? Thank you in advance
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023799998
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +129,24 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ for (FileStatus status : fs.listStatus(databasePath)) {
+ if (status.isDirectory() &&
+ status.getPath().getName().matches("(.*)" + AcidConstants.SOFT_DELETE_TABLE_PATTERN)) {
Review Comment:
could you please explain this check? can't we simply by listing the dir count?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023799998
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +129,24 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ for (FileStatus status : fs.listStatus(databasePath)) {
+ if (status.isDirectory() &&
+ status.getPath().getName().matches("(.*)" + AcidConstants.SOFT_DELETE_TABLE_PATTERN)) {
Review Comment:
could you please explain this check? can we simply list the dir count?
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +129,24 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ for (FileStatus status : fs.listStatus(databasePath)) {
+ if (status.isDirectory() &&
+ status.getPath().getName().matches("(.*)" + AcidConstants.SOFT_DELETE_TABLE_PATTERN)) {
Review Comment:
could you please explain this check? can't we simply list the dir count?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023810414
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/entities/CompactionInfo.java:
##########
@@ -368,4 +370,12 @@ public void setWriteIds(boolean hasUncompactedAborts, Set<Long> writeIds) {
public boolean isAbortedTxnCleanup() {
return type == CompactionType.ABORT_TXN_CLEANUP;
}
+
+ public boolean isSoftDelete() {
+ return "true".equalsIgnoreCase(getProperty(hive_metastoreConstants.SOFT_DELETE_DATABASE));
Review Comment:
Boolean.parseBoolean
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023830299
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
in another pr you have SOFT_DELETE_TABLE, maybe
````
soft_delete: {true,false}
operation: {drop_database, drop_table}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4180199710
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [3 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3028402961
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
Done. Have added SoftDeleteOperation enum with drop_database and drop_table and used them.
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3023830299
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java:
##########
@@ -244,4 +246,13 @@ private long getTxnId(EnvironmentContext context) {
.map(Long::parseLong)
.orElse(0L);
}
+
+ private void addSoftDeletePropertiesToRequest(EnvironmentContext context, CompactionRequest request) {
+ if ("true".equalsIgnoreCase(context.getProperties().get(hive_metastoreConstants.SOFT_DELETE_DATABASE))) {
Review Comment:
in another pr you have SOFT_DELETE_TABLE, maybe
````
operation: {drop_database, drop_table}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4273530685
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130683823
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
return deleted;
}
+
+ private void removeDatabaseDirIfNecessary(Database db, CleanupRequest cr, FileSystem fs) throws IOException {
+ if (db != null || !cr.isSoftDelete()) {
+ return;
+ }
+ Path databasePath = new Path(cr.getLocation()).getParent();
+ if (FileUtils.isDirEmpty(fs, databasePath)) {
Review Comment:
please use short circuit
````
if (!FileUtils.isDirEmpty(fs, databasePath)) {
return;
}
````
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130967299
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
Review Comment:
Done. Have renamed it to removeDbDirIfOrphaned()
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4261649328
let's merge https://github.com/apache/hive/pull/6399 first
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Managed database directory not deleted after DROP DATABASE when hive.acid.lockless.reads.enabled is true [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4163615300
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4269092075
@VenuReddy2103, please rebase. https://github.com/apache/hive/pull/6399 is merged
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130690336
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
Review Comment:
maybe `removeDbDirIfOrphaned`?
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
Review Comment:
maybe `removeDbDirIfOrphaned`/Empty?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130690336
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
Review Comment:
maybe `removeDatabaseDirIfEmpty`?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "VenuReddy2103 (via GitHub)" <gi...@apache.org>.
VenuReddy2103 commented on code in PR #6397:
URL: https://github.com/apache/hive/pull/6397#discussion_r3130967299
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/FSRemover.java:
##########
@@ -126,6 +127,20 @@ private List<Path> removeFiles(CleanupRequest cr)
deleted.add(dead);
}
}
+ removeDatabaseDirIfNecessary(db, cr, fs);
Review Comment:
Done. Have changed it to removeDatabaseDirIfEmpty()
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29528: Cleanup managed DB dir after async drop [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6397:
URL: https://github.com/apache/hive/pull/6397#issuecomment-4307024637
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6397&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6397&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6397&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6397)
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org