Skip to content
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

Fix bug #6671: RealtimeTableDataManager shuts down SegmentBuildTimeLeaseExtender for all tables in the host #6682

Merged
merged 1 commit into from Mar 16, 2021

Conversation

jtao15
Copy link
Contributor

@jtao15 jtao15 commented Mar 14, 2021

This pr change SegmentBuildTimeLeaseExtender from instance level to table level, so removing one table will not accidentally shut down the SegmentBuildTimeLeaseExtender of other tables.

@snleee
Copy link
Contributor

snleee commented Mar 15, 2021

#6671

@jtao15 jtao15 changed the title [WIP]Fix bug #6671: RealtimeTableDataManager shuts down SegmentBuildTimeLeaseExtender for all tables in the host Fix bug #6671: RealtimeTableDataManager shuts down SegmentBuildTimeLeaseExtender for all tables in the host Mar 15, 2021
@jtao15 jtao15 force-pushed the leaseExtender branch 2 times, most recently from 7aee81d to ada5299 Compare March 16, 2021 01:58
@codecov-io
Copy link

Codecov Report

Merging #6682 (ada5299) into master (1beaab5) will decrease coverage by 22.97%.
The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #6682       +/-   ##
===========================================
- Coverage   66.44%   43.47%   -22.98%     
===========================================
  Files        1075     1388      +313     
  Lines       54773    67508    +12735     
  Branches     8168     9792     +1624     
===========================================
- Hits        36396    29346     -7050     
- Misses      15700    35700    +20000     
+ Partials     2677     2462      -215     
Flag Coverage Δ
integration 43.47% <42.85%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ot/broker/broker/AllowAllAccessControlFactory.java 100.00% <ø> (ø)
...t/broker/broker/BasicAuthAccessControlFactory.java 0.00% <0.00%> (ø)
.../helix/BrokerUserDefinedMessageHandlerFactory.java 52.83% <0.00%> (-13.84%) ⬇️
...org/apache/pinot/broker/queryquota/HitCounter.java 0.00% <0.00%> (-100.00%) ⬇️
...che/pinot/broker/queryquota/MaxHitRateTracker.java 0.00% <0.00%> (ø)
...ache/pinot/broker/queryquota/QueryQuotaEntity.java 0.00% <0.00%> (-50.00%) ⬇️
...ker/routing/instanceselector/InstanceSelector.java 100.00% <ø> (ø)
...ceselector/StrictReplicaGroupInstanceSelector.java 0.00% <0.00%> (ø)
...roker/routing/segmentpruner/TimeSegmentPruner.java 0.00% <0.00%> (ø)
...roker/routing/segmentpruner/interval/Interval.java 0.00% <0.00%> (ø)
... and 1414 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d877558...ada5299. Read the comment docs.

Copy link
Contributor

@snleee snleee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

Copy link
Contributor

@jackjlli jackjlli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Pls address all the comments before merging the PR. Thanks!

…TimeLeaseExtender for all tables in the host
@snleee snleee merged commit 4ec38f7 into apache:master Mar 16, 2021
if (v == null) {
return new SegmentBuildTimeLeaseExtender(instanceId, serverMetrics, tableNameWithType);
} else {
LOGGER.warn("Lease extender for Table: {} already exists", tableNameWithType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a warning? The method is to getOrCreate(). Getting the extender is perfectly ok. Please change it to INFO or no log at all.

ServerMetrics serverMetrics, String tableNameWithType) {
return TABLE_TO_LEASE_EXTENDER.compute(tableNameWithType, (k, v) -> {
if (v == null) {
return new SegmentBuildTimeLeaseExtender(instanceId, serverMetrics, tableNameWithType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a log here "Creating lease extender for the table {}"

@@ -91,9 +92,12 @@ public synchronized void init(PinotConfiguration config, HelixManager helixManag
Preconditions.checkState(instanceSegmentTarDir.mkdirs());
}

// Initialize segment build time lease extender executor
SegmentBuildTimeLeaseExtender.initExecutor();
LOGGER.info("Initialized segment build time lease extender executor");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this log to be inside the method initExecutor()

@@ -108,6 +112,8 @@ public synchronized void shutDown() {
for (TableDataManager tableDataManager : _tableDataManagerMap.values()) {
tableDataManager.shutDown();
}
SegmentBuildTimeLeaseExtender.shutdownExecutor();
LOGGER.info("Segment build time lease extender executor shut down");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this log to be inside shutDownExecutor()

xiangfu0 pushed a commit that referenced this pull request Apr 7, 2021
…aseExtender for all tables in the host (#6682)

Co-authored-by: Jiapeng Tao <jiatao@jiatao-mn1.linkedin.biz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants