Allow server uses of LocalCollection to prefer _UnyieldingQueue. This
will mean that, as long as their observeChanges callbacks do not yield,
calls to insert/update/remove will not yield either.
- move _makeNonreactive into wrapTransform
- Use EJSON.equals for _id comparison
- Return null for nonexistent transforms
- Use isPlainObject for objectness check
- Add unit tests; remove some end-to-end tests
Also, add an EJSON.clone to the recently backported observeHandle._fetch
All existing listener callbacks were already calling complete()
synchronously, so this should not be a functional change.
This allows us to also eliminate the callback from crossbar.fire().
This in turn allows us to eliminate the `proxy_write` in
Meteor.refresh. The only purpose of that write was to keep the current
write fence open until fire's async callback got called; now that fire
works synchronously, it's not necessary! (This relies on the fact that
write fences never get armed while they are the current write fence,
which now has an assertion.)
- use startsWith for strings rather than x.indexOf(y) && x[y.length] === '.'
- more comments with examples
- consistent naming isSimple => simpleRange, simpleInequality, etc
- Fix the pruning `expectedScalarIsObject`
- Limit $gt,$lt,... to numbers only (since there needs to be more logic to support dates and strings later)
- Add comments on dubious parts
This greatly reduces the number of places in the code where "stringified
IDs" are passed around.
Specifically, changed these maps into _IdMaps:
- minimongo
- the main LocalCollection docs map
- LocalCollection._savedOriginals
- unordered query results, in several places:
- query.results
- query.results_snapshot
- return value from _getRawObjects
- as passed to _diffQueryChanges
- livedata
- Connection._serverDocuments[collection]
- mongo-livedata
- SynchronousCursor._visitedIds
- return value from SynchronousCursor.getRawObjects
- PollingObserveDriver._results (when unordered)
`new MongoConnection` can now yield. I can't remember why I thought this
would be a problem when first implementing OplogHandle, and it does not
seem to be from initial testing.