You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2025/06/02 17:36:25 UTC
[PR] makes shutdown in compactor process to always halt [accumulo]
keith-turner opened a new pull request, #5609:
URL: https://github.com/apache/accumulo/pull/5609
Ran into an issue where a compactor process threw an exception that caused it to exit its main servers thread. This caused it shut down its thrift server and delete its lock in zookeeper. However the process stayed alive after its lock was deleted. This may have been due to some non daemon threads in the process.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] makes shutdown in compactor process to always halt [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner merged PR #5609:
URL: https://github.com/apache/accumulo/pull/5609
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] makes shutdown in compactor process to always halt [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #5609:
URL: https://github.com/apache/accumulo/pull/5609#discussion_r2122074609
##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -181,26 +180,15 @@ public AtomicBoolean getShutdownComplete() {
* </pre>
*/
public void runServer() throws Exception {
- final AtomicReference<Throwable> err = new AtomicReference<>();
serverThread = new Thread(TraceUtil.wrap(this), applicationName);
- serverThread.setUncaughtExceptionHandler((thread, exception) -> err.set(exception));
+ serverThread.setUncaughtExceptionHandler(Threads.UEH);
Review Comment:
Actually, I take that back. By not raising the Exception, the process will exit with a status code of `0`.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] makes shutdown in compactor process to always halt [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5609:
URL: https://github.com/apache/accumulo/pull/5609#discussion_r2121783601
##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -190,9 +190,11 @@ public void runServer() throws Exception {
verificationThread.interrupt();
verificationThread.join();
}
- log.info(getClass().getSimpleName() + " process shut down.");
Throwable thrown = err.get();
- if (thrown != null) {
+ if (thrown == null) {
+ log.info("{} process shut down.", getClass().getSimpleName());
+ } else {
+ log.error("{} process failure.", getClass().getSimpleName(), thrown);
Review Comment:
This change is unrelated to the fix, but its something I noticed while looking into this. This exception does not seem to be logged, seems it would only go to stderr.
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] makes shutdown in compactor process to always halt [accumulo]
Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on code in PR #5609:
URL: https://github.com/apache/accumulo/pull/5609#discussion_r2122071344
##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -181,26 +180,15 @@ public AtomicBoolean getShutdownComplete() {
* </pre>
*/
public void runServer() throws Exception {
- final AtomicReference<Throwable> err = new AtomicReference<>();
serverThread = new Thread(TraceUtil.wrap(this), applicationName);
- serverThread.setUncaughtExceptionHandler((thread, exception) -> err.set(exception));
+ serverThread.setUncaughtExceptionHandler(Threads.UEH);
Review Comment:
I think change is might have better handling for `Error` than what is used at https://github.com/apache/accumulo/blob/2ecf4f69419570a060a1ba191ab0a0a00002fef9/start/src/main/java/org/apache/accumulo/start/Main.java#L157-L170
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] makes shutdown in compactor process to always halt [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5609:
URL: https://github.com/apache/accumulo/pull/5609#discussion_r2122092113
##########
server/base/src/main/java/org/apache/accumulo/server/AbstractServer.java:
##########
@@ -181,26 +180,15 @@ public AtomicBoolean getShutdownComplete() {
* </pre>
*/
public void runServer() throws Exception {
- final AtomicReference<Throwable> err = new AtomicReference<>();
serverThread = new Thread(TraceUtil.wrap(this), applicationName);
- serverThread.setUncaughtExceptionHandler((thread, exception) -> err.set(exception));
+ serverThread.setUncaughtExceptionHandler(Threads.UEH);
Review Comment:
Did not realize all of that code in start.Main would eventually be called. Reverted the changes to AbstractServers so that things would keep working the same way between AbstractServer and Main.start
--
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: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org