Created
March 21, 2016 15:59
-
-
Save eden/812155e79ba78cbe73c3 to your computer and use it in GitHub Desktop.
rethinkdb crash repro
This file contains 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
import rethinkdb as r | |
conn = r.connect() | |
tables = r.db('test').table_list().run(conn) | |
if 'random' not in tables: | |
r.db('test').table_create('random').run(conn) | |
r.db('test').table('random').insert(dict(a=1)).run(conn) | |
r.db('test').table('random').insert(dict(b=2)).run(conn) | |
r.db('test').table('random').insert(dict(c=3)).run(conn) | |
print 'test.random created' | |
for _ in range(0, 4): | |
row = r.db('test').table('random').order_by(lambda t: r.random()).limit(1).run(conn) | |
print row | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment