Skip to content

Conversation

@littleeleventhwolf
Copy link
Contributor

What is the purpose of the change

This pull request tracks the pendingManualCompactions in org.apache.flink.state.rocksdb.sstmerge.CompactionTracker:

Brief change log

  • Currently, there is only pendingManualCompactions-- in the code.
  • Add pendingManualCompactions++ to correct the logic.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

@flinkbot
Copy link
Collaborator

flinkbot commented Oct 11, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@littleeleventhwolf
Copy link
Contributor Author

@flinkbot run azure

1 similar comment
@littleeleventhwolf
Copy link
Contributor Author

@flinkbot run azure

}
}

public synchronized void addManualCompaction() {
Copy link
Contributor

Choose a reason for hiding this comment

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

the method name does not seem correct. haveManualCompactions refers to runningManualCompactions and pendingManualCompactions. I suggest scheduleManualCompaction.

}
}

public synchronized void addManualCompaction() {
Copy link
Contributor

@davidradl davidradl Oct 21, 2025

Choose a reason for hiding this comment

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

can we add some unit tests for this class.
I am curious about the method

private synchronized void cancel() {
        pendingManualCompactions--;
    }

If the cancel can be called while it is running then the pending counter could go negative - as we have already decremented the pending counter when we incremented the running one.

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants