xtern commented on a change in pull request #8846:
URL: https://github.com/apache/ignite/pull/8846#discussion_r601230271
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/Checkpointer.java
##########
@@ -713,31 +713,34 @@ public void schedulePartitionDestroy(@Nullable
CacheGroupContext grpCtx, int grp
/**
* @param grpId Group ID.
* @param partId Partition ID.
+ * @return {@code True} if the request to destroy the partition was
canceled.
*/
- public void cancelOrWaitPartitionDestroy(int grpId, int partId) throws
IgniteCheckedException {
+ public boolean cancelOrWaitPartitionDestroy(int grpId, int partId) throws
IgniteCheckedException {
PartitionDestroyRequest req;
+ boolean canceled = false;
synchronized (this) {
- req = scheduledCp.getDestroyQueue().cancelDestroy(grpId, partId);
- }
-
- if (req != null)
- req.waitCompleted();
+ req = scheduledCp.getDestroyQueue().removeRequest(grpId, partId);
- CheckpointProgressImpl cur;
+ if (req == null) {
+ CheckpointProgressImpl cur = curCpProgress;
- synchronized (this) {
- cur = curCpProgress;
+ if (cur != null)
+ req = cur.getDestroyQueue().removeRequest(grpId, partId);
Review comment:
Added deletion from both scheduled and current cp progress.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]