replace mutex with context aware semaphore#1616
Open
HayimShaul wants to merge 17 commits into
Open
Conversation
f3571af to
fa4068e
Compare
adecaro
reviewed
May 5, 2026
| // The function respects context cancellation and deadlines, returning an error if the context is cancelled | ||
| // or times out before all locks can be acquired. This prevents indefinite blocking and enables fast failure | ||
| // in case of lock contention or deadlock scenarios. | ||
| func (d *StoreService) AcquireLocks(ctx context.Context, anchor string, eIDs ...string) error { |
Contributor
There was a problem hiding this comment.
please, add unit-tests for this function. Let's make sure the code works as expected. Thanks.
adecaro
requested changes
May 5, 2026
Contributor
adecaro
left a comment
There was a problem hiding this comment.
Thanks @HayimShaul , please, add unit-tests.
c178394 to
14dc95c
Compare
Contributor
|
Hi @HayimShaul , any update on this? thanks 🙏 |
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
…rics (#1660) Signed-off-by: Soumya8898 <soumyaranjanmohapatra784@gmail.com> Signed-off-by: Soumya Mohapatra <mohapatras@microsoft.com> Co-authored-by: Soumya Mohapatra <mohapatras@microsoft.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
…#1694) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
…ecurrence (#1696) Signed-off-by: Ankit Basu <ankitbasu14@gmail.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: atharrva01 <atharvaborade568@gmail.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
#1689) Signed-off-by: Rama542 <ramasasankgudipati@gmail.com> Co-authored-by: Rama542 <Rama542@users.noreply.github.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
#1628) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com> Co-authored-by: Angelo De Caro <adc@zurich.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
…st (#1691) Signed-off-by: SuyashAlphaC <suyashagrawal862@gmail.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com> Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
6c8dd3d to
14cd156
Compare
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.
address issue #1609