Skip to content

Conversation

@swamirishi
Copy link
Contributor

What changes were proposed in this pull request?

Rename RDBBatchOperation as AtomicRDBBatchOperation and introduce base abstract class RDBBatchOperation

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14211

How was this patch tested?

Just refactoring no additional tests required

…ntroduce base abstract class RDBBatchOperation

Change-Id: Ia81bd22e402fb8e96a613760bce9fd97ac51d849
@swamirishi
Copy link
Contributor Author

@adoroszlai I renamed the class here the diff ideally should only do rename RDBBatchOperation -> AtomicRDBBatchOperation and then create a new RDBBatchOperation class

@adoroszlai
Copy link
Contributor

@swamirishi

This PR should not introduce the new base class, nor touch BatchOperation, both of which cause bigger diff due to the signature changes. Only:

create factory method RDBBatchOperation.newBatch() and replace existing calls to new RDBBatchOperation() with it. This is a trivial change that can be quickly merged.

(newAtomicOperation instead of newBatch is fine.)

@adoroszlai
Copy link
Contributor

Created #9545 for the factory method. After that, this PR can focus on renaming RDBBatchOperation to AtomicRDBBatchOperation, adding the parent class as RDBBatchOperation, and moving the factory method to the new RDBBatchOperation.

@adoroszlai adoroszlai requested review from jojochuang and smengcl and removed request for adoroszlai December 22, 2025 18:13
@adoroszlai adoroszlai changed the title HDDS-14211. Rename RDBBatchOperation as AtomicRDBBatchOperation and introduce base abstract class RDBBatchOperation HDDS-14211. Extract base RDBBatchOperation, rename implementation to AtomicRDBBatchOperation Dec 23, 2025
*/
public final class RDBBatchOperation implements BatchOperation {
static final Logger LOG = LoggerFactory.getLogger(RDBBatchOperation.class);
public abstract class RDBBatchOperation implements BatchOperation {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can RDBBatchOperation be an interface instead of abstract class? (It was one in #9511.)

Copy link
Contributor Author

@swamirishi swamirishi Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be only abstact classes since interfaces don't allow package private methods. The methods should not be exposed outside the db package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants