[
https://issues.apache.org/jira/browse/HIVE-25898?focusedWorklogId=720094&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-720094
]
ASF GitHub Bot logged work on HIVE-25898:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Feb/22 12:59
Start Date: 03/Feb/22 12:59
Worklog Time Spent: 10m
Work Description: veghlaci05 commented on a change in pull request #2981:
URL: https://github.com/apache/hive/pull/2981#discussion_r797458415
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Worker.java
##########
@@ -207,26 +206,16 @@ static void gatherStats(CompactionInfo ci, HiveConf conf,
String userName, Strin
}
}
- static final class CompactionHeartbeater extends Thread {
+ static final class CompactionHeartbeater implements Runnable {
static final private Logger LOG =
LoggerFactory.getLogger(CompactionHeartbeater.class);
private final CompactionTxn compactionTxn;
private final String tableName;
private final HiveConf conf;
- private final AtomicBoolean errorLogEnabled;
public CompactionHeartbeater(CompactionTxn compactionTxn, String
tableName, HiveConf conf) {
this.tableName = Objects.requireNonNull(tableName);
this.compactionTxn = Objects.requireNonNull(compactionTxn);
this.conf = Objects.requireNonNull(conf);
- this.errorLogEnabled = new AtomicBoolean(true);
-
- setDaemon(true);
- setPriority(MIN_PRIORITY);
- setName("CompactionHeartbeater-" + compactionTxn.getTxnId());
- }
-
- public void shouldLogError(boolean shouldLogError) {
- this.errorLogEnabled.set(shouldLogError);
Review comment:
If you check the issue, a race condition could cause a last heartbeat
after commit/abort. The added logic was fixed that. In my change I moved
heartbeat interrupt before commit abort, making the entire logging logic
unnecessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 720094)
Time Spent: 2h 20m (was: 2h 10m)
> Compaction txn heartbeating after Worker timeout
> ------------------------------------------------
>
> Key: HIVE-25898
> URL: https://issues.apache.org/jira/browse/HIVE-25898
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Reporter: László Végh
> Assignee: László Végh
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> In some cases, when the compaction transaction is aborted, the hearbeater
> thread is not shut down and keeps heartbeating.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)