Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Support more advanced schemas, including foreign keys #131

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f92a538
Small type updates and support for schemas
awreece Nov 7, 2017
31b82d0
Support nested objects with foreign keys
awreece Nov 7, 2017
b001d8c
Stricter error checking
awreece Nov 13, 2017
8f7c22f
Better support for alternative primary keys
awreece Nov 13, 2017
677175c
no active record
awreece Nov 14, 2017
3433099
fix timestamp
joshbeam Nov 14, 2017
68d67dd
add run script for migration
joshbeam Nov 14, 2017
38d5d4e
fix run script
joshbeam Nov 14, 2017
18f0433
do alex’s run script
joshbeam Nov 14, 2017
1ee7f02
looser type checking
awreece Nov 14, 2017
0919a8b
parallel import
awreece Nov 14, 2017
2d7950d
fix sanity check
joshbeam Nov 14, 2017
9e10bfb
allow subtables of composite key tables
awreece Nov 14, 2017
0b00ea0
properly find nested names
awreece Nov 15, 2017
d1d25c0
parent keys come before child keys in tables
awreece Nov 16, 2017
30f1bdf
case sensitive
awreece Nov 18, 2017
ac49560
limit max parallelism
awreece Nov 18, 2017
537910a
bigger pool
awreece Nov 22, 2017
98e282f
print using original
awreece Nov 27, 2017
7426323
unconditionally save tail state on initial import
awreece Dec 1, 2017
1818ecf
fix primary key handling for sub tables
awreece Dec 1, 2017
5aacf66
:name to be a to_sym
awreece Dec 1, 2017
322f876
always store types as syms
awreece Dec 2, 2017
9e97eaa
cant log from a signal handler
awreece Dec 4, 2017
dc6684e
puts in signal handler is ok
awreece Dec 8, 2017
a4aa002
types can be numerics
awreece Dec 9, 2017
db5c8b1
better handle delete op
awreece Dec 17, 2017
55a0ba2
more likely to quit
awreece Dec 18, 2017
04eaa69
bail out early if we fail to import a collection
awreece Dec 26, 2017
c2bb55c
better error message
awreece Dec 29, 2017
55b820d
dont bail out early
awreece Dec 29, 2017
6ec11c9
ignore vendor
awreece Dec 29, 2017
0f19c62
next instead of break
awreece Dec 29, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
collections.yml
/.bundle/
Gemfile.lock
vendor
7 changes: 7 additions & 0 deletions bin/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

scriptdir=$(python -c "import os; print(os.path.realpath('$(dirname $0)'))")
rootdir=$scriptdir/../

export RUBYLIB=$rootdir/lib:$RUBYLIB
exec $rootdir/bin/mosql "$@"
4 changes: 2 additions & 2 deletions lib/mosql/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(args)
def setup_signal_handlers
%w[TERM INT USR2].each do |sig|
Signal.trap(sig) do
log.info("Got SIG#{sig}. Preparing to exit...")
puts("Got SIG#{sig}. Preparing to exit...")
@streamer.stop
end
end
Expand Down Expand Up @@ -121,7 +121,7 @@ def parse_args
end

def connect_mongo
@mongo = Mongo::MongoClient.from_uri(options[:mongo])
@mongo = Mongo::MongoClient.from_uri(options[:mongo], :pool_size => 8)
config = @mongo['admin'].command(:ismaster => 1)
if !config['setName'] && !options[:skip_tail]
log.warn("`#{options[:mongo]}' is not a replset.")
Expand Down
Loading