This is an automated email from the ASF dual-hosted git repository.
abhay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new 7406d2d RANGER-3554: [Intermittent] API call to fetch the list of
policies for a particular service repo returns a deleted policy in the response
7406d2d is described below
commit 7406d2d04d473d0dbacb39b9d75d883768a44cea
Author: Abhay Kulkarni <[email protected]>
AuthorDate: Wed Dec 15 21:18:56 2021 -0800
RANGER-3554: [Intermittent] API call to fetch the list of policies for a
particular service repo returns a deleted policy in the response
---
.../ranger/common/db/RangerTransactionSynchronizationAdapter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/security-admin/src/main/java/org/apache/ranger/common/db/RangerTransactionSynchronizationAdapter.java
b/security-admin/src/main/java/org/apache/ranger/common/db/RangerTransactionSynchronizationAdapter.java
index 6c4902b..ed84462 100644
---
a/security-admin/src/main/java/org/apache/ranger/common/db/RangerTransactionSynchronizationAdapter.java
+++
b/security-admin/src/main/java/org/apache/ranger/common/db/RangerTransactionSynchronizationAdapter.java
@@ -120,9 +120,10 @@ public class RangerTransactionSynchronizationAdapter
extends TransactionSynchron
final boolean isParentTransactionCommitted = status ==
STATUS_COMMITTED;
+ List<Runnable> runnablesAfterCommit = RUNNABLES_AFTER_COMMIT.get();
+ RUNNABLES_AFTER_COMMIT.remove();
+
if (isParentTransactionCommitted) {
- List<Runnable> runnablesAfterCommit = RUNNABLES_AFTER_COMMIT.get();
- RUNNABLES_AFTER_COMMIT.remove();
// Run tasks scheduled to run after transaction is successfully
committed
runRunnables(runnablesAfterCommit, true);
}