Skip to content

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)

(cherry picked from commit 8d16580)
(cherry picked from commit 30fe564)
  • Loading branch information
heesung-sn authored and srinath-ctds committed Jan 8, 2024
1 parent c2d3d37 commit 4b7f34b
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 @@ -1412,7 +1412,7 @@ protected void monitorOwnerships(List<String> brokers) {
continue;
}

if (now - stateData.timestamp() > semiTerminalStateWaitingTimeInMillis) {
if (!isActiveState(state) && now - stateData.timestamp() > semiTerminalStateWaitingTimeInMillis) {
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 @@ -636,7 +636,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 @@ -1406,7 +1406,7 @@ public void splitAndRetryFailureTest() throws Exception {

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

0 comments on commit 4b7f34b

Please sign in to comment.