Skip to content

HDDS-14211. Extract base RDBBatchOperation, rename implementation to AtomicRDBBatchOperation#9526

Closed
swamirishi wants to merge 5 commits intoapache:masterfrom
swamirishi:HDDS-14211
Closed

HDDS-14211. Extract base RDBBatchOperation, rename implementation to AtomicRDBBatchOperation#9526
swamirishi wants to merge 5 commits intoapache:masterfrom
swamirishi:HDDS-14211

Conversation

@swamirishi
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@github-actions
Copy link
Copy Markdown

This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.

@github-actions github-actions Bot added the stale label Jan 14, 2026
@github-actions
Copy link
Copy Markdown

Thank you for your contribution. This PR is being closed due to inactivity. If needed, feel free to reopen it.

@github-actions github-actions Bot closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants