-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 table level lock for segment upload #6165
Conversation
f3a94cc
to
9ba9f4e
Compare
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #6165 +/- ##
==========================================
- Coverage 66.44% 64.05% -2.40%
==========================================
Files 1075 1237 +162
Lines 54773 58482 +3709
Branches 8168 8655 +487
==========================================
+ Hits 36396 37462 +1066
- Misses 15700 18284 +2584
- Partials 2677 2736 +59
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
8a02f09
to
145a314
Compare
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.
Good catch. We can simplify the logic by using ConcurrentHashMap
@@ -1505,10 +1507,19 @@ public void deleteOfflineTable(String tableName) { | |||
LOGGER.info("Deleting table {}: Removed table config", offlineTableName); | |||
|
|||
// Remove instance partitions | |||
final String rawTableName = TableNameBuilder.extractRawTableName(tableName); |
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.
(nit) we don't use final
for local variable
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
Discussed offline and suggested:
|
1b9d2de
to
a17ea4c
Compare
a17ea4c
to
7a10126
Compare
pinot-common/src/main/java/org/apache/pinot/common/utils/helix/HelixHelper.java
Outdated
Show resolved
Hide resolved
...ntroller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
Outdated
Show resolved
Hide resolved
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.
minor comment, otherwise lgtm
pinot-spi/src/main/java/org/apache/pinot/spi/utils/retry/RandomDelayRetryPolicy.java
Outdated
Show resolved
Hide resolved
/** | ||
* Delay policy with random delay between attempts. | ||
*/ | ||
public class RandomDelayRetryPolicy extends BaseRetryPolicy { |
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.
Thanks for adding this. This will be useful in other places as well.
Description
Add table level lock for segment upload to avoid unnecessary race conditions to cause idealstates update failure when pushing new segments with high parallelism.