sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [17/32] sentry git commit: SENTRY-2036: sentry_sync_notifications() should set ID when it returns errors (Alex Kolbasov, reviewed by: Sergio Pena)
Date Thu, 16 Nov 2017 09:56:54 GMT
SENTRY-2036: sentry_sync_notifications() should set ID when it returns errors (Alex Kolbasov,
reviewed by: Sergio Pena)


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/fe48f482
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/fe48f482
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/fe48f482

Branch: refs/heads/akolb-cli
Commit: fe48f482ea8687bf34f91e572cfcc2db01cff0ad
Parents: 8de33e0
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Wed Nov 8 16:00:36 2017 -0800
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Wed Nov 8 16:00:36 2017 -0800

----------------------------------------------------------------------
 .../provider/db/service/thrift/SentryPolicyStoreProcessor.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/fe48f482/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
index 71eb9c1..650880b 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
@@ -1161,11 +1161,13 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface
{
       String msg = String.format("wait request for id %d is interrupted",
               request.getId());
       LOGGER.error(msg, e);
+      response.setId(0);
       response.setStatus(Status.RuntimeError(msg, e));
       Thread.currentThread().interrupt();
     } catch (TimeoutException e) {
-      String msg = String.format("timeod out wait request for id %d", request.getId());
+      String msg = String.format("timed out wait request for id %d", request.getId());
       LOGGER.warn(msg, e);
+      response.setId(0);
       response.setStatus(Status.RuntimeError(msg, e));
     }
     return response;


Mime
View raw message