Repository: sentry Updated Branches: refs/heads/sentry-ha-redesign 2a812120c -> 0bf0a9990
SENTRY-1526: Sentry processed stays alive after being killed (Alexander Kolbasov via Vamsee Yarlagadda) Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/0bf0a999 Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/0bf0a999 Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/0bf0a999 Branch: refs/heads/sentry-ha-redesign Commit: 0bf0a99908ebefd6203eb61bc5fc9f2c2646c2ee Parents: 2a81212 Author: Vamsee Yarlagadda <[email protected]> Authored: Fri Dec 16 10:53:19 2016 -0800 Committer: Vamsee Yarlagadda <[email protected]> Committed: Fri Dec 16 10:59:59 2016 -0800 ---------------------------------------------------------------------- .../java/org/apache/sentry/service/thrift/SentryService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sentry/blob/0bf0a999/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java index bc1fe1f..5e36e48 100644 --- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java +++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java @@ -432,13 +432,15 @@ public class SentryService implements Callable { server.stop(); } catch (Throwable t) { LOGGER.error("Error stopping SentryService", t); + System.exit(1); } } }); // Let's wait on the service to stop try { - server.waitOnFuture(); + // Wait for the service thread to finish + server.serviceStatus.get(); } finally { server.serviceExecutor.shutdown(); }
