Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write hooks with
{'primary_key': , 'timestamp':}
, also fixes r.now …
…determinism problems (#6396) * Restore deterministic r.now * encapsulate deterministic_t * Fix 'class deterministic_t' decl in term.hpp. * Make deterministic_t interface clearer. Avoids external bitmask magic. * Rename deterministic_t static members to traditional names. * Allow r.now() before .changes(). * Make rcheck visitors in seq.cc not use variadic. Just to make code more readable. * Allow r.now() in comparison functions. * Add test polyglot/changefeeds/now * Added order_by r.now() regression test. * add _t suffix to avoid name clash * Fix simple compilation error. * Misc cleanup of env_t ctor usage - Remove an "explicit" from a multi-arg env_t ctor - Use get_serializable_env in ordered_union_datum_stream_t Because why not. * Make query cache maintain deterministic r.now(). Fixes problem where long datum streams would use a fresh time value every time a new batch is requested. For example, this query would see multiple "b" field values: r.range(150000).map(lambda x: {"a": x, "b": r.now()}) This also makes changefeed requests use the same r.now() value. * Removed defunct term_walker_t time_now field. * Make read_all_rows_as_vector abstract. Everybody overrides it, and nobody overrides read_all_rows_as_stream. Made the latter not be virtual. * Factor out read_all_rows_filtered to return as vector. Make callers use it: - caching_cfeed_artificial_table_backend_t - table_estimate_doc_counts * Make from_optargs take deterministic_time. So we don't crash when r.now() is used inside a global optarg. * Pass deterministic_time to limit_manager_t env. * Tweak env_t construction in range_sub_t. No functional change, just a cleanup. * Unimplemented write_timestamp_term_t WIP. * env_t style cleanup * Implemented write_timestamp_term_t::eval_impl * Write hooks ostensibly getting run in their own environment. * Add WRITE_TIMESTAMP to protobuf definition * r.writeTimestamp() in the JavaScript driver * r.write_timestamp() in the Python driver * js_pprint of write_timestamp is just fine. * Comment on env_t constructor * Write hooks disallowing r.now(). * Removed duplicate write hook checking logic. * Pass {"primary_key":, "timestamp":} object to write hooks * Remove r.write_timestamp() ReQL term * Remove extra write_timestamp stuff from Python and JS drivers * Add polyglot tests for write hook context object
- Loading branch information
1 parent
8d7e97b
commit 1a6f685
Showing
49 changed files
with
300 additions
and
274 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.