ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-ranger git commit: RANGER-724: AuditBatchQueue.waitToComplete() updated to recompute prevQueueSize within while loop
Date Mon, 09 Nov 2015 03:45:18 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 0158e1a1c -> c89b01f28


RANGER-724: AuditBatchQueue.waitToComplete() updated to recompute prevQueueSize within while
loop


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

Branch: refs/heads/master
Commit: c89b01f28aeda1fa7fc05de7546e1e12614a4319
Parents: 0158e1a
Author: Madhan Neethiraj <madhan@apache.org>
Authored: Sun Nov 8 11:07:14 2015 -0800
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Sun Nov 8 11:07:14 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/c89b01f2/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
b/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
index f3a38dc..5b56c96 100644
--- a/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
+++ b/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
@@ -168,9 +168,11 @@ public class AuditBatchQueue extends AuditQueue implements Runnable {
 				if (staticLoopCount > 5) {
 					logger.error("Aborting writing to consumer. Some logs will be discarded."
 							+ getName() + ".size=" + queue.size());
+					break;
 				}
 			} else {
 				staticLoopCount = 0;
+				prevQueueSize = queue.size();
 			}
 			if (consumerThread != null) {
 				consumerThread.interrupt();


Mime
View raw message