You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by ka...@apache.org on 2018/07/16 22:48:31 UTC
sentry git commit: SENTRY-2190: Have verbose debug logs in
CounterWait class (Kalyan Kumar Kalvagadda reviewed by Lina li and Steve
Moist)
Repository: sentry
Updated Branches:
refs/heads/master 4a75a3931 -> ef90f311f
SENTRY-2190: Have verbose debug logs in CounterWait class (Kalyan Kumar Kalvagadda reviewed by Lina li and Steve Moist)
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/ef90f311
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/ef90f311
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/ef90f311
Branch: refs/heads/master
Commit: ef90f311f9138ecc35f8e6faf487d5b019bbf0af
Parents: 4a75a39
Author: Kalyan Kumar Kalvagadda <kk...@cloudera.com>
Authored: Mon Jul 16 17:46:30 2018 -0500
Committer: Kalyan Kumar Kalvagadda <kk...@cloudera.com>
Committed: Mon Jul 16 17:46:30 2018 -0500
----------------------------------------------------------------------
.../sentry/provider/db/service/persistent/CounterWait.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sentry/blob/ef90f311/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/CounterWait.java
----------------------------------------------------------------------
diff --git a/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/CounterWait.java b/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/CounterWait.java
index ea2f77d..a256b20 100644
--- a/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/CounterWait.java
+++ b/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/CounterWait.java
@@ -188,6 +188,7 @@ public class CounterWait {
public long waitFor(long value) throws InterruptedException, TimeoutException {
// Fast path - counter value already reached, no need to block
if (value <= currentId.get()) {
+ LOGGER.debug("Value {} reached", value);
return currentId.get();
}
@@ -199,6 +200,7 @@ public class CounterWait {
// value event is enqueued, the counter value already reached the requested
// value. In this case we return immediately.
if (value <= currentId.get()) {
+ LOGGER.debug("Value {} reached", value);
return currentId.get();
}
@@ -209,8 +211,8 @@ public class CounterWait {
// the event's blocking queue will be non-empty and the waitFor() below
// will not block, so it is safe to wake up before the wait.
// So sit tight and wait patiently.
+ LOGGER.debug("Blocked, waiting for value {}", value);
eid.waitFor();
- LOGGER.debug("CounterWait added new value to waitFor: value = {}, currentId = {}", value, currentId.get());
return currentId.get();
}
@@ -240,7 +242,7 @@ public class CounterWait {
return;
}
// Due for wake-up call
- LOGGER.debug("CounterWait wakeup: event = {} is less than value = {}", e.getValue(), value);
+ LOGGER.debug("Unblocking, Value {} reached", e.getValue());
e.wakeup();
}
}