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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for concurrent batch Append and Replace #14407
Add support for concurrent batch Append and Replace #14407
Changes from 4 commits
d9563f2
35cc335
4d01445
5acf93b
be23936
6a9e6e7
e3e9cf3
2ed61fd
0d9b5e6
38a0071
f5144a0
1413a30
468e4a2
d495c3c
671c01c
311d0ca
5e4876b
a2732ca
8f1e165
83d9484
06cf8d3
5981130
073bc26
12534ff
b271f1f
725265c
41c3cbe
1fabacf
5963be3
9fd156c
71023ca
a1c22a8
7b0e259
258caed
2fd2b9e
55eca90
1ba0e8d
ff71674
4e0587f
359a923
2bb3b79
ab0b400
8bb5a13
ae5e7c4
9c7d5b2
17ab844
e2b04d4
37640b7
5f5c5bf
444cfe4
6309702
f5b7092
58433d0
a88da61
057252e
7df51f2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This Set appears to be getting made for the sole purpose of being iterated across in the critical section. I'm not sure why building yet-another set from the set that we already have is really helpful here?
I'm guessing that this is the result of code iterations, but please be very conscious of objects. No object should be created without a purpose.
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 set
segments
could be immutable but new segments can be added toallSegments
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.
I wish we could get a better error message than this... Ah well
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.
We should have logged the intervals though.
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.
If I understand this corectly, this comment is saying that the
for
loop is a noop if the critical section failed. I.e. this loop will only do something ifretVal.isSuccess() == true
. If that's the case, then let's just move the loop inside that part of the if/else above.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 verb
get
makes it sound like youa re trying to "get" something. This is creating a new object, not getting anything. In the future, if you have a need for somethign like that (converting from one type to another), create a static creator method on the object that you are building. I.e. in this case, it would beTaskLockInfo.fromTaskLock(TaskLock lock)
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.
TaskLock is not available in that package, which is why the class TaskLockInfo needs to be created there and this method cannot be implemented