Closed
Conversation
d97d57d to
54132ec
Compare
tksugimoto
commented
Jul 14, 2021
| val storeProbe = createTestProbe[SequenceStore.Command]() | ||
| val firstValue = 3 | ||
| val incrementStep = 10 | ||
| val reservationAmount = 2 |
Contributor
Author
There was a problem hiding this comment.
val reservationAmount = 2
val reservationAmount = 1 の場合に、予約失敗 SequenceStore.ReservationFailed が発生すると、SKIPされる番号がある影響でずっと予約され続けて採番が成功しない問題があった。
2021-07-14 19:48:55.348 INFO lerna.util.sequence.SequenceFactoryWorker$ akka://SequenceFactoryWorkerSpec/user/$c - dummy Reserving sequence: remain 0, add 1, current max reserved: 3
2021-07-14 19:48:55.462 INFO lerna.util.sequence.SequenceFactoryWorker$ akka://SequenceFactoryWorkerSpec/user/$c - dummy Reserving sequence: remain 0, add 1, current max reserved: 13
2021-07-14 19:48:55.566 INFO lerna.util.sequence.SequenceFactoryWorker$ akka://SequenceFactoryWorkerSpec/user/$c - dummy Reserving sequence: remain 0, add 1, current max reserved: 23
2021-07-14 19:48:55.675 INFO lerna.util.sequence.SequenceFactoryWorker$ akka://SequenceFactoryWorkerSpec/user/$c - dummy Reserving sequence: remain 0, add 1, current max reserved: 33
TODO:
別Issue対応
Contributor
Author
There was a problem hiding this comment.
#44 reservationAmount = 1 での採番で無限ループのリスク · Issue #44 · lerna-stack/lerna-app-library
Contributor
There was a problem hiding this comment.
@tksugimoto
reserving から ready に戻すときに元の nextValue に戻すと問題がありますか?
Contributor
Author
There was a problem hiding this comment.
できそうですが、複雑になるので別のバグの発生を気にして選択しませんでした。
現状、結構複雑なので状態の整理をしたほうが良さそうです。
Contributor
Author
There was a problem hiding this comment.
val reservationAmount = 1 の場合に、予約失敗 SequenceStore.ReservationFailed が発生すると、SKIPされる番号がある影響でずっと予約され続けて採番が成功しない問題があった。
別Issue対応
nextValue <= maxReservedValueの条件により stashReservationFailedによって unstash & ready 遷移- 無限ループ
という流れなのでこのPRの修正が原因(の一つ)だった
Contributor
Author
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.