Skip to content
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

r.minval/r.maxval can be written to rethinkdb._debug_scratch #4032

Closed
larkost opened this issue Apr 8, 2015 · 2 comments
Closed

r.minval/r.maxval can be written to rethinkdb._debug_scratch #4032

larkost opened this issue Apr 8, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@larkost
Copy link
Collaborator

larkost commented Apr 8, 2015

The polyglot/mutation/insert tests are failing inside interface.artificial_table because that table seems to avoid our check that r.minval and r.maxval are not insertable and so the checks for errors when inserting those into rethinkdb._debug_scratch are failing. @danielmewes guesses that this is due to the lack of serialization for rethinkdb._debug_scratch.

This is easily demonstrated outside of the tests:

>>> r.db('rethinkdb').table('_debug_scratch').insert({'value':r.minval}).run()
{u'errors': 0, u'deleted': 0, u'generated_keys': [u'0b48f71a-c5e8-4831-aae0-9207332b76d7'], u'unchanged': 0, u'skipped': 0, u'replaced': 0, u'inserted': 1}
>>> r.db('rethinkdb').table('_debug_scratch').run()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "rethinkdb/ast.py", line 97, in run
    return c._start(self, **global_optargs)
  File "rethinkdb/net.py", line 520, in _start
    return self._instance.run_query(q, global_optargs.get('noreply', False))
  File "rethinkdb/net.py", line 400, in run_query
    raise res.make_error(query)
rethinkdb.errors.RqlRuntimeError: Cannot convert `r.minval` to JSON. in:
r.db('rethinkdb').table('_debug_scratch')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is probably isolated to the rethinkdb._debug_scratch table, so it is unlikely that actual users would ever encounter it, but it would be nice to solve as it would be complicated to work around in the test.

@danielmewes danielmewes added this to the 2.0-polish milestone Apr 8, 2015
@danielmewes danielmewes modified the milestones: backlog, 2.0.x May 2, 2015
@danielmewes danielmewes modified the milestones: 2.2, backlog Sep 24, 2015
@danielmewes danielmewes self-assigned this Sep 24, 2015
@danielmewes
Copy link
Member

A fix for this is in CR 3249 with @mlucy

@danielmewes
Copy link
Member

This was fixed in next by 750f09c .
I also cherry-picked the fix into v2.1.x 7362e1c, because the same issue existed there.

On next, the artificial table test is currently still failing because of #4669.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants