adoroszlai commented on code in PR #9388:
URL: https://github.com/apache/ozone/pull/9388#discussion_r2573076219
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RocksDatabase.java:
##########
@@ -665,6 +666,33 @@ public Collection<ColumnFamily> getExtraColumnFamilies() {
return Collections.unmodifiableCollection(columnFamilies.values());
}
+ public void dropColumnFamily(String tableName) throws RocksDatabaseException
{
+ ColumnFamily columnFamily = columnFamilies.get(tableName);
+ if (columnFamily != null) {
+ try {
+ getManagedRocksDb().get().dropColumnFamily(columnFamily.getHandle());
Review Comment:
@swamirishi Copying my
[question](https://github.com/apache/ozone/pull/9384#discussion_r2567577511)
and your response from the previous PR from which this was split:
> > Shouldn't it increment reference count via `acquire()` while operating
on the DB?
>
> we cannot do a flush for the column family anymore.
Sorry, I don't understand how that answers the question.
The DB is reference-counted to avoid being closed while performing
operations concurrently. IMO we should enclose `db.get().dropColumnFamily()`
in:
https://github.com/apache/ozone/blob/218642c0a3c02cebd6f3603a043077de60118a69/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RocksDatabase.java#L477
Please correct me if I'm wrong.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]