-
Couldn't load subscription status.
- Fork 109
Store last-tailed oplog timestamp so the tailer can resume properly #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
percona-csalguero
approved these changes
Jul 10, 2018
timvaillancourt
added a commit
that referenced
this pull request
Jul 18, 2018
timvaillancourt
added a commit
that referenced
this pull request
Jul 18, 2018
timvaillancourt
added a commit
that referenced
this pull request
Jul 18, 2018
* Shorten the locking in tailQuery() * Shorten the locking in tailQuery() #2
timvaillancourt
added a commit
that referenced
this pull request
Aug 2, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 2, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 3, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 6, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 6, 2018
* add configsvr shard getter * Test isXXXX funcs with db conn * Test isXXXX funcs with db conn #2
timvaillancourt
added a commit
that referenced
this pull request
Aug 10, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 10, 2018
* add structs for replsets * Add more internal/cluster tests * Fix tests * Scoring WIP * Splitting up more code * More scorer tweaks * more cleanup * Add more tests * Fix lag tests * Cleanup code * Add shortcut for primary * Add more tests * add more tests * Throw error if compare member is nil * fix test * Add comments and improve scorer * Fix scoring code * fix scorer tests * Check for no winner * Rename structs + file * Use testutils vars in test * Use testutils vars in test #2 * Fixing tests
timvaillancourt
added a commit
that referenced
this pull request
Aug 11, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 11, 2018
* Make isMaster funcs in internal/cluster public, add IsShardsvr() * Add balancer funcs * Add balancer funcs, decouple funcs that used mgo.Session * Add balancer funcs, decouple funcs that used mgo.Session #2
timvaillancourt
added a commit
that referenced
this pull request
Aug 18, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 18, 2018
* Cleanup tests * Func rename * Move map->slice * Move ShardingState to struct-methods * Move ShardingState to struct-methods #2
timvaillancourt
added a commit
that referenced
this pull request
Aug 19, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 19, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 20, 2018
* Use strings.SplitN() * Add error var * var rename * var rename #2
timvaillancourt
added a commit
that referenced
this pull request
Aug 21, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 22, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 22, 2018
* Check hot backup is supported, split up files * Check hot backup is supported, split up files #2 * cleanup testing * Improve testing * Add testdata for hotbackup restore * Add testdata for hotbackup restore * Add-back defers * Add restore funcs * Add restore funcs test * Add restore tests * add vendor dir for globalsign/mgo * Remove root from docker-compose.yml * Updates * Update mgo * remove useless check/removeall * Check ownership of restore+dbpath * Check ownership of restore+dbpath #2 * Update restore test * Use dep * dep updates * Fix build automation * Building readme
timvaillancourt
added a commit
that referenced
this pull request
Aug 23, 2018
timvaillancourt
added a commit
that referenced
this pull request
Aug 27, 2018
* Allow test mongodb user to read 'config' * Add interface * Add locking, but comment-out because it is broken * Use ioutil.TempDir() instead of static test paths * Use ioutil.TempDir() instead of static test paths #2 * Tweaks for hotbackup startServer()
timvaillancourt
added a commit
that referenced
this pull request
Nov 2, 2018
timvaillancourt
added a commit
that referenced
this pull request
Nov 5, 2018
timvaillancourt
added a commit
that referenced
this pull request
Nov 12, 2018
timvaillancourt
added a commit
that referenced
this pull request
Nov 12, 2018
timvaillancourt
added a commit
that referenced
this pull request
Dec 11, 2018
timvaillancourt
added a commit
that referenced
this pull request
Dec 14, 2018
timvaillancourt
added a commit
that referenced
this pull request
Dec 20, 2018
timvaillancourt
added a commit
that referenced
this pull request
Dec 20, 2018
* Fix --version output, skip i386 * Rename for new repo * Goreleaser ldflags and arch fix #2
timvaillancourt
added a commit
that referenced
this pull request
Dec 26, 2018
timvaillancourt
added a commit
that referenced
this pull request
Dec 29, 2018
timvaillancourt
added a commit
that referenced
this pull request
Dec 29, 2018
timvaillancourt
added a commit
that referenced
this pull request
Jan 10, 2019
timvaillancourt
added a commit
that referenced
this pull request
Jan 10, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR stores the last-tailed oplog entry so that the tailer can resume from the last position in .tailQuery() properly.
.lastOplogEntry (that stored a whole oplog doc in my POC) is renamed to .lastOplogTimestamp. Storing the bson.MongoTimestamp instead of the full last oplog document (mdbstructs.Oplog) reduces memory from 16MB max (max size of an oplog doc) to a consistent 8 bytes (size of a bson.MongoTimestamp).
.lastOplogTimestamp is a pointer to bson.MongoTimestamp so that it can be checked with "if != nil".
A new struct OplogTimestampOnly was added to reduce umarshalling and GC overhead when we only need to unmarshal the "ts"/timestamp. I moved .getOplogTailTimestamp() to use this also, as it only needs the "ts" field.