Commit Graph

4993 Commits

Author SHA1 Message Date
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
David Glasser
33528ddbc3 test doc fetcher 2013-12-02 19:17:27 -08:00
David Glasser
85ada6a874 doc fetcher! 2013-12-02 19:17:26 -08:00
David Glasser
6905807375 rename writes collection to sequencers. will be used for observe catchup too 2013-12-02 19:17:26 -08:00
David Glasser
4f23be3168 oops, stop listenersHandle 2013-12-02 19:17:26 -08:00
David Glasser
c9c465bcfb all tests now pass (mostly because I made sure the failing tests
avoid oplog, but they are testing basically implementation details)

there's a "insert found for already-existing ID" somewhere though

trasnform: null, interesting...
2013-12-02 19:17:26 -08:00
David Glasser
5ffb4a9a15 handle _id properly in replace. many tests pass. 2013-12-02 19:17:26 -08:00
David Glasser
5a4ae936aa Until I do the right thing, it's slightly more right to do the query before
listening.
2013-12-02 19:17:26 -08:00
David Glasser
a93f742b3a ok, rewrite is done.
now "replace" updates work too. also give up on idea of knowing
what fields changed (more correct, does require an in memory diff).

many tests pass.
2013-12-02 19:17:26 -08:00
David Glasser
0344e946fd more progress 2013-12-02 19:17:26 -08:00
David Glasser
ffc70c1611 xxx now 2013-12-02 19:17:25 -08:00
David Glasser
d3d285426d somewhat implement write fence (latency compensation) 2013-12-02 19:17:25 -08:00
David Glasser
c4c9837194 fix $unset 2013-12-02 19:17:25 -08:00
David Glasser
abcc7d9bb9 very basic update support 2013-12-02 19:17:25 -08:00
David Glasser
1c8c7d171c very basic insert support 2013-12-02 19:17:25 -08:00
David Glasser
cae886b2f0 remove processing works. 2013-12-02 19:17:25 -08:00
David Glasser
ba63548d4d checkpoint monday morning 2013-12-02 19:17:25 -08:00