 
    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

                     (doseq [ks (empheral-ls connector (sync-point-path-keys connector topic))]
                       (empheral-del connector (:path ks)))
                     ;set the assignments and un set the partition flag
                     (prn "set assignements " members " " ids " = " (distribute-ids members ids))
                     (empheral-set connector (assignments-path topic) (distribute-ids members ids))
                     (empheral-del connector (partition-flag-path topic)))
                   (prn  "sync keys " (empheral-ls connector (sync-point-path-keys connector topic)) " members " (map :path (get-partition-members connector topic))))
                 )
               
               (if (is-partition-flag? connector topic)
		             (do (Thread/sleep 100) (recur (inc c)))))))

    (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))
    (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
