GitHub PushEvent at 2014-09-05 11:12:09
Repository: meteor
Actor: mitar
Payload: {"shas":[["85a734f2553f190b5631cf3826e2fe99156446dc","f386fef061857c9871a1f1df1345c713b77b455c@meteor.com","Fix PollingObserveDriver error handling\n\nThe getRawObjects call can throw (eg, if you can't connect to the mongo\nserver for too long).  A few pieces of state were being corrupted in\nthat case:\n\n- self._results was being set too early, leading to 'first' not being\n  set on future _pollMongo calls, and_multiplexer.ready() never being\n  called. This had two effects:\n\n    - The observe (and thus any subscription) would never become\n      ready().  Due to deduping, *no observe on this query* would\n      ever become ready either.  This also implies that the\n      observeChanges that are part of _publishCursor would never return,\n      so the sub.onStop would never get called, so the observeHandle\n      would never stop, leading not only to leaks, but for an inability\n      for that query to ever stop being deduped with the corrupted\n      PollingObserveDriver!\n\n    - The onFlush calls would throw a \"not ready\" error instead of\n      calling the callback, so (a) errors would be logged and (b) write\n      fences would never be closed\n\n  Fixed this by not writing to self._results at the top of the function.\n\n- writesForCycle was being lost, so those write fences would never\n  close. Fixed this by pushing writesForCycle back onto _pendingWrites\n  if getRawObjects throws.","David Glasser",true]],"size":1,"ref":"refs/heads/peerlibrary","head":"85a734f2553f190b5631cf3826e2fe99156446dc"}