{"shas":[["eeac4f08911a143a0a93613ae2e6690990507a2e","60ccda8f195bbc9deb6ce656a92f6573cb89e6b6@solidfire.com","ZOOKEEPER-965 - fix inoperable multi called from watch context.\n\nWhile integrating the new zoo_multi and zoo_amulti into the\ncode at our company, we discovered a nasty bug in the C API. If\na multi op is triggered from a watch callback, then it would hang\nindefinitely. This was due to a fundamental flaw in my earlier\nimplementation whereby I treated all the ops in a multi op as\nasynchronous, with a forced synchronous tail completion that I\ntacked onto the end of my completion list. BUT, that tail completion\nultimately never got called when called from a watch context!!\n\nThe fix was ultimately to create code in both process functions\n(both sync and async) for dealing with multi-ops. Each op inside\nthe multiop is dealt with the same, so they call into a common\nfunction. This way, all the existing logic for dealing with\nsync/async completions now deals with multi ops instead of\nme trying to deal with that specially.\n\nI've also added a new unit test that demonstrated this bug and\nalso now passes with my refactoring.","Marshall McMullen"]],"ref":"refs/heads/multi","size":1,"head":"eeac4f08911a143a0a93613ae2e6690990507a2e","push_id":32436787}