David Glasser
2d170a0971
Add some facts to oplog.
2013-12-02 19:17:34 -08:00
David Glasser
c7329ff617
Extra error checking around calling callbacks.
2013-12-02 19:17:33 -08:00
David Glasser
2f5ed9a3d3
Stop using weird "curiousity" nomenclature.
2013-12-02 19:17:33 -08:00
David Glasser
24913f862b
When FETCHING, process add/delete/replace directly
...
Unless they are for one of the currently-fetching IDs.
Note that this can reorder observes! But so can poll-based observe. That
said, I think it can reorder them in a more noticable way.
Specifically, with poll-based observe, if you observe two operations A1
and A2 on a doc A, then you are guaranteed to have seen any operation on
any document that occured before A1. This is not the case after this
commit for oplog-based observe. (Not sure if it was before this
commit...)
2013-12-02 19:17:33 -08:00
David Glasser
2f1ebbbcc7
Restructure code to "allow" misordered sequencers.
...
Throw in an assertion that they aren't misordered anyway. This will be
removed before merge. But it should never fire for a singleton replset.
2013-12-02 19:17:33 -08:00
David Glasser
3960fcc963
More usable error messages for misordered oplog.
2013-12-02 19:17:33 -08:00
David Glasser
6ff2c1c9ce
Set Mongo connection pool size better.
...
Fixes (for now) misordered oplog errors.
2013-12-02 19:17:33 -08:00
David Glasser
b4a598b3e5
Close connection to DB used to set up oplog.
2013-12-02 19:17:33 -08:00
David Glasser
9cc8ca6c2b
Don't fire write fence until observes are steady.
2013-12-02 19:17:32 -08:00
David Glasser
f797a49beb
Support oplog when MONGO_URL is a replset.
...
Node's URL parser doesn't support Mongo's "URLs" which contain commas in
the hostname part. Instead of trying to parse, just extract the database
name from ... the database!
2013-12-02 19:17:32 -08:00
David Glasser
bcbc73bc4a
Add more info to the misordered oplog errors.
2013-12-02 19:17:32 -08:00
David Glasser
0d45c5f009
Limit poolsize for "last oplog entry" to 1.
...
This ensures that we allocate sequencers in increasing order.
2013-12-02 19:17:32 -08:00
David Glasser
19e41af82a
Only use one connection for oplog tailing.
2013-12-02 19:17:32 -08:00
David Glasser
599a2f928e
Separate oplog tail queries from other operations.
...
This prevents the "look up last oplog entry" queries from taking several
seconds 1/5 of the time when the query is on the same pooled connection
as the awaitdata tail query.
2013-12-02 19:17:32 -08:00
David Glasser
aae9fc23db
replace sequencer writes with reads.
2013-12-02 19:17:32 -08:00
Slava Kim
f24be0684f
Use MinimongoTest object to export private functions for unit tests
2013-12-02 19:17:31 -08:00
David Glasser
73b45f2fa2
Actually use Slava's function in oplog tailing.
...
Tests pass, but I have not confirmed that it actually has the desired
end-to-end effect.
2013-12-02 19:17:31 -08:00
David Glasser
81d77f916b
Link to a PR and use latest version.
2013-12-02 19:17:31 -08:00
David Glasser
acb6decb6a
Make run-tools-tests.sh pass.
2013-12-02 19:17:31 -08:00
David Glasser
0ddf232773
Restore accidentally-deleted mongo restart code.
...
Thanks, cli-test.sh!
2013-12-02 19:17:31 -08:00
Slava Kim
3dc3ad9997
Simplify getPaths - method for getting important key paths from a selector
...
object.
2013-12-02 19:17:31 -08:00
Slava Kim
12f5f4e87e
Another test to ensure correct observation of object literals.
2013-12-02 19:17:31 -08:00
David Glasser
75f6037203
Set internal Mongo replay flag when tailing oplog.
2013-12-02 19:17:30 -08:00
David Glasser
3c39614e50
Fix typo in test.
2013-12-02 19:17:30 -08:00
Slava Kim
37120d186c
One more test
2013-12-02 19:17:30 -08:00
Slava Kim
7fc451da3e
Glasser's comments
2013-12-02 19:17:30 -08:00
Slava Kim
1c17d8af44
More work with numeric keys to be more precise answering if modifier affects selector.
2013-12-02 19:17:30 -08:00
Slava Kim
b5d9df66c1
Tests for "observe array element" case
...
ex.: collection.find({ 'foo.0.bar': 2 })
// => find docs with bar of first element of array foo being 2
2013-12-02 19:17:30 -08:00
Slava Kim
a75470bcf3
Fix the way we remove integer fields
2013-12-02 19:17:30 -08:00
Slava Kim
2dc25d77ae
Fix prefix check. Remove all numeric keys from sel
2013-12-02 19:17:30 -08:00
David Glasser
df73dca222
Make a comment about something important into an XXX comment.
2013-12-02 19:17:29 -08:00
David Glasser
10f3e9c90f
Add a comment about a non-redundant stopped check.
2013-12-02 19:17:29 -08:00
David Glasser
16ac0d7ba2
Fix bad error check.
2013-12-02 19:17:29 -08:00
David Glasser
badf20c35a
LICENSE for quotemeta, add comment about duplication
2013-12-02 19:17:29 -08:00
David Glasser
7d1ab34788
Refactor MongoConnection options: oplogUrl, not isOplog
...
Move hacky use of env var to a slightly more appropriate place
2013-12-02 19:17:29 -08:00
David Glasser
441279eb13
rename: 'options' should always be *our* options
2013-12-02 19:17:29 -08:00
David Glasser
a8201cc17e
Block on first call to observeChanges if there is an oplog handle that is still
...
initializing.
2013-12-02 19:17:29 -08:00
Slava Kim
11bf813f90
If foo changes, than foo.bar observation result may change.
2013-12-02 19:17:28 -08:00
Slava Kim
480c353c65
Some simplest tests for isSelectorAffectedByModifier
...
and some tests fail :(
2013-12-02 19:17:28 -08:00
Slava Kim
c3c79a94ea
Tests for getPaths for selector and fix for a bug these tests caught
2013-12-02 19:17:28 -08:00
Slava Kim
dbbda54c68
First implementation of _isSelectorAffectedByModifier.
2013-12-02 19:17:28 -08:00
David Glasser
7f85f38110
Change repl set name from dummy to meteor.
...
This name ends up in the "meteor mongo" prompt, and a prompt of "dummy:PRIMARY>"
is way less welcoming than "meteor:PRIMARY>".
2013-12-02 19:17:28 -08:00
David Glasser
9cbb5946c4
don't poll the database if we can just execute the modifier directly
2013-12-02 19:17:28 -08:00
David Glasser
40befb8023
minor improvements
2013-12-02 19:17:28 -08:00
David Glasser
cd0bdecaec
keep prototype on timestamps when they are cloned (all tests pass)
2013-12-02 19:17:27 -08:00
David Glasser
ab34a277fc
make test do what it says
2013-12-02 19:17:27 -08:00
David Glasser
ff000110a0
only one mongo-livedata test fails
2013-12-02 19:17:27 -08:00
David Glasser
fbfda21dfb
whoa, we're halfway there
2013-12-02 19:17:27 -08:00
David Glasser
c5c19114ab
refactor oplog stuff into its own file
2013-12-02 19:17:27 -08:00
David Glasser
0017eacbe9
use docfetcher
2013-12-02 19:17:27 -08:00