[ranger] branch master updated: RANGER-3554: [Intermittent] API call to fetch the list of policies for a particular service repo returns a deleted policy in the response - Part 2"
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 993cf0d RANGER-3554: [Intermittent] API call to fetch the list of policies for a particular service repo returns a deleted policy in the response - Part 2" 993cf0d is described below commit 993cf0d9a98a2ea8f01d1fbbd3d6a1177a8887ca Author: Abhay Kulkarni AuthorDate: Sat Dec 18 14:57:18 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 - Part 2" --- .../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 ed84462..0f3f311 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 @@ -123,13 +123,14 @@ public class RangerTransactionSynchronizationAdapter extends TransactionSynchron List runnablesAfterCommit = RUNNABLES_AFTER_COMMIT.get(); RUNNABLES_AFTER_COMMIT.remove(); +List runnables = RUNNABLES.get(); +RUNNABLES.remove(); + if (isParentTransactionCommitted) { // Run tasks scheduled to run after transaction is successfully committed runRunnables(runnablesAfterCommit, true); } -List runnables = RUNNABLES.get(); -RUNNABLES.remove(); // Run other tasks scheduled to run after transaction completes runRunnables(runnables, false);
[ranger] branch master updated: RANGER-3554: [Intermittent] API call to fetch the list of policies for a particular service repo returns a deleted policy in the response
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 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 runnablesAfterCommit = RUNNABLES_AFTER_COMMIT.get(); +RUNNABLES_AFTER_COMMIT.remove(); + if (isParentTransactionCommitted) { -List runnablesAfterCommit = RUNNABLES_AFTER_COMMIT.get(); -RUNNABLES_AFTER_COMMIT.remove(); // Run tasks scheduled to run after transaction is successfully committed runRunnables(runnablesAfterCommit, true); }