-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another fix for `IllegalStateException: startTime must be set if segm…
…ent is RUNNING or DONE` this time due to context.storage.updateRepairSegment() not properly setting startTime after coordinator.triggerRepair() returns 0 and segment is marked as DONE. The segment's startTime is not set until in `processTriggeredSegment(..)` But in `runRepair()` there's a number of exit (return) points possible before this method is called (and without startTime being set). ref: #291 (comment)
- Loading branch information
1 parent
ff0214f
commit 67d6721
Showing
1 changed file
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67d6721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelsembwever, I think this commit does not fix the #291
I still see the same behavior in case of "Nothing to repair for segment" gets logged - and that is probably because startTime is still not set.
LOG.info("Nothing to repair for segment {} in keyspace {}", segmentId, keyspace); context.storage.updateRepairSegment(segment.with().state(RepairSegment.State.DONE).endTime(DateTime.now()).build(segmentId)
So this results in
So I tried changing this to
and it solved the problem
67d6721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the
segment
variable was not being updated with the new state on line 264.thanks for the catch.
fix is in #323
@sergeyyegournov would you be able to test and verify the PR?
67d6721
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelsembwever Thanks. Verified - I do not see the issue any longer