Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,15 @@ public synchronized void removeEventFromBuffer(EnrichedEvent event) {
while (!current.equalsInIoTConsensusV2(event) && iterator.hasNext()) {
current = iterator.next();
}
iterator.remove();
if (current.equalsInIoTConsensusV2(event)) {
iterator.remove();
} else {
LOGGER.warn(
"IoTConsensusV2-ConsensusGroup-{}: event-{} not found in transferBuffer, skip removing. queue size = {}",
consensusGroupId,
event,
transferBuffer.size());
}
// update replicate progress
currentReplicateProgress =
Math.max(currentReplicateProgress, event.getReplicateIndexForIoTV2());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,18 @@ private Event supplyDeletionEvent(final DeletionResource deletionResource) {
skipIfNoPrivileges,
false);

// if using IoTV2, assign a replicateIndex for this historical deletion event
if (DataRegionConsensusImpl.getInstance() instanceof IoTConsensusV2
&& IoTConsensusV2Processor.isShouldReplicate(event)) {
event.setReplicateIndexForIoTV2(
ReplicateProgressDataNodeManager.assignReplicateIndexForIoTV2(pipeName));
LOGGER.debug(
"[{}]Set {} for historical deletion event {}",
pipeName,
event.getReplicateIndexForIoTV2(),
event);
}

if (sloppyPattern || isDbNameCoveredByPattern) {
event.skipParsingPattern();
}
Expand Down
Loading