     (controlled-assignments connector host-name topic ids curr-assignments))
   ([connector host topic ids curr-assignments]
      ;identify master
-    (prn "is-master!? " host  " " (is-master!? connector host topic))
+    ;(prn "is-master!? " host  " " (is-master!? connector host topic))
     (empheral-set connector (str topic "/partition-members/" host) (System/currentTimeMillis))
      
     (if (is-master!? connector host topic) ;here the master sets the assignment flag (sync barrier) only if needed


   Returns true if any waiting was actually done (i.e if the sync barrier was entered or not)"
  [connector host topic ids]
  (prn host " is-partition-flag? " (is-partition-flag? connector topic) " topic " topic "is master " (is-master!? connector host topic))
  (if (is-partition-flag? connector topic)
    (let [start-time (System/currentTimeMillis)] 
      ;notify syncpoint

  ;(prn "perform-assignments is-flag " (empheral-get connector (partition-flag-path topic)) " - d1 "   (empheral-get connector (assignments-path topic))
   ; " d2 " (distribute-ids (get-member-keys connector topic) ids)  " ids " ids " members " (get-member-keys connector topic))
  
  (if (and ;only perform assignments if the partion flag is false and the calculated assignment differs from the saved one
        (not (empheral-get connector (partition-flag-path topic)))
        (not= (empheral-get connector (assignments-path topic)) (distribute-ids (get-member-keys connector topic) ids)))
      (do 
        (expire-set connector 120 (partition-flag-path topic) true))
      
      ))
