Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
[fix][broker] Fixed ServiceUnitStateChannel monitor to tombstone only…
Browse files Browse the repository at this point in the history
… inactive bundle states (apache#21721)
  • Loading branch information
heesung-sn authored Dec 14, 2023
1 parent 9b043c6 commit 8d16580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ protected void monitorOwnerships(List<String> brokers) {
continue;
}

if (now - stateData.timestamp() > stateTombstoneDelayTimeInMillis) {
if (!isActiveState(state) && now - stateData.timestamp() > stateTombstoneDelayTimeInMillis) {
log.info("Found semi-terminal states to tombstone"
+ " serviceUnit:{}, stateData:{}", serviceUnit, stateData);
tombstoneAsync(serviceUnit).whenComplete((__, e) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ public void splitAndRetryTest() throws Exception {
var leader = channel1.isChannelOwnerAsync().get() ? channel1 : channel2;
validateMonitorCounters(leader,
0,
3,
1,
0,
0,
0,
Expand Down Expand Up @@ -1409,7 +1409,7 @@ public void splitAndRetryFailureTest() throws Exception {

validateMonitorCounters(leader,
0,
3,
1,
1,
0,
0,
Expand Down

0 comments on commit 8d16580

Please sign in to comment.