You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/09 16:39:21 UTC

[GitHub] [pulsar] zhanghaou opened a new pull request #7222: Fix bug related to managedLedger properties

zhanghaou opened a new pull request #7222:
URL: https://github.com/apache/pulsar/pull/7222


   Fix issue [https://github.com/apache/pulsar/issues/7161](https://github.com/apache/pulsar/issues/7161)
   
   **Motivation**
   1. Check operations in the same time to avoid ZK bad version errors.
   2. Solve the concurrency issues.
   
   **Modifications**
   1. Add isOverwrite param in asyncSetProperties and setProperties;
   2. Add propertiesMutex to avoid concurrency issues.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zhanghaou commented on a change in pull request #7222: Fix bug related to managedLedger properties

Posted by GitBox <gi...@apache.org>.
zhanghaou commented on a change in pull request #7222:
URL: https://github.com/apache/pulsar/pull/7222#discussion_r437817354



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -3245,14 +3243,19 @@ public void setPropertiesFailed(ManagedLedgerException exception, Object ctx) {
     }
 
     @Override
-    public void asyncSetProperties(Map<String, String> properties, final SetPropertiesCallback callback, Object ctx) {
+    public void asyncSetProperties(Map<String, String> properties, boolean isOverwrite,
+                                   final SetPropertiesCallback callback,
+                                   Object ctx) {
+        propertiesMutex.lock();

Review comment:
       OK. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on a change in pull request #7222: Fix bug related to managedLedger properties

Posted by GitBox <gi...@apache.org>.
merlimat commented on a change in pull request #7222:
URL: https://github.com/apache/pulsar/pull/7222#discussion_r437650906



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -3245,14 +3243,19 @@ public void setPropertiesFailed(ManagedLedgerException exception, Object ctx) {
     }
 
     @Override
-    public void asyncSetProperties(Map<String, String> properties, final SetPropertiesCallback callback, Object ctx) {
+    public void asyncSetProperties(Map<String, String> properties, boolean isOverwrite,
+                                   final SetPropertiesCallback callback,
+                                   Object ctx) {
+        propertiesMutex.lock();

Review comment:
       The properties feature in ManagedLedger is very broken as described in https://github.com/apache/pulsar/pull/7054#issuecomment-637843729. 
   
   This PR is not addressing the overall issue, so I think it's better to hold off until a proper solution is in place.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zhanghaou closed pull request #7222: [WIP] bug related to managedLedger properties

Posted by GitBox <gi...@apache.org>.
zhanghaou closed pull request #7222:
URL: https://github.com/apache/pulsar/pull/7222


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org