Skip to content

Rethinkdb next - #1

Merged
timmaxw merged 3 commits into
rethinkdb:rethinkdb-nextfrom
danielmewes:rethinkdb-next
Nov 7, 2012
Merged

timmaxw merged 3 commits into
rethinkdb:rethinkdb-nextfrom
danielmewes:rethinkdb-next

Conversation

@danielmewes

Copy link
Copy Markdown
Member

Two small changes:

  1. I had a very minor problem with the stress client Makefile on my system, which shows itself once a non-GNU default compiler is installed
  2. The content-type header was checked too strictly in HTTP POST and PUT requests.

Daniel Mewes added 2 commits November 6, 2012 01:27
…oblems:

If the default cc compiler on the system is not GCC, sqlite3.c will be compiled with a different compiler than the remaining .cc files (for which g++ was already explicitly specified).
I had this issue on my PC where cc envokes the Oracle Solaris Studio compiler, which resulted in very weird linking errors.
@coffeemug

Copy link
Copy Markdown
Contributor

The content type checking should be abstracted into a function -- we duplicate exactly the same piece of code twice.

@ghost ghost assigned jdoliner Nov 6, 2012
@jdoliner

jdoliner commented Nov 6, 2012

Copy link
Copy Markdown
Contributor

I think even better than that would be just inlining the sub stringing
within the predicate. I can't imagine it being much more concise than that.

On Monday, November 5, 2012, coffeemug wrote:

The content type checking should be abstracted into a function -- we
duplicate exactly the same piece of code twice.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-10097779.

@danielmewes

Copy link
Copy Markdown
Member Author

I "outlined" it intentionally to make the code more verbose and easier to read, but that's up to taste.
I just found that there's a boost function to check the prefix of a string, boost::starts_with(content_type.get(), expected_content_type). This would allow for a compact inlining in the predicate again.

@danielmewes

Copy link
Copy Markdown
Member Author

How about this?
It both inlines the substringing (through boost) AND puts the check in a separate function (which should better reside in a more general place I suppose. I wasn't sure where exactly though).

@jdoliner

jdoliner commented Nov 7, 2012

Copy link
Copy Markdown
Contributor

Alright I have reviewed this and pushed it to rethinkdb-internal it should propagate to the external repo shortly and thus close this request.

@timmaxw
timmaxw merged commit 42a377d into rethinkdb:rethinkdb-next Nov 7, 2012
@coffeemug

Copy link
Copy Markdown
Contributor

FYI, this took a while because we broke our hourly cron job that pushes internal to public. Fixed now. Also, hopefully internal will go away soon so we can get rid of this whole process.

@ghost ghost mentioned this pull request Nov 14, 2012
@nuin nuin mentioned this pull request Feb 3, 2015
Tryneus pushed a commit that referenced this pull request Apr 15, 2015
Tryneus pushed a commit that referenced this pull request Jul 21, 2015
Fix for Twisted driver Python 3 compatibility and some corner cases
@akatebi akatebi mentioned this pull request Jul 3, 2016
totalwindupflightsystems pushed a commit to totalwindupflightsystems/rethinkdb that referenced this pull request Aug 1, 2026
QUEUE rethinkdb#1 of the approved PHASE3 roadmap.

UPSERT (term 216):
- table.upsert(docs) = insert with conflict='update' semantics by default,
  Postgres ON CONFLICT DO UPDATE parity. Same optargs as insert
  (conflict, durability, return_changes, ...); an explicit
  optarg overrides the default.
- Implemented by parameterizing insert_term_t with a conflict default
  and subclassing — zero duplicated write logic.

MERGE_DEEP (term 217):
- Postgres-style deep merge. Stock  already recurses into nested
  objects but REPLACES arrays wholesale; merge_deep also descends into
  arrays element-wise (by position), merging object elements and
  extending longer right arrays.  falls back to stock
  behavior.
- Added  to the global acceptable-optargs whitelist (it was
  missing, causing a compile-time sanity-check crash).

Driver: regenerated ql2_pb2.py, Upsert + MergeDeep query classes, and
table.upsert()/expr().merge_deep() methods. Whitelist regression test
extended to cover both new term IDs.

Verified live: 9/9 merge E2E assertions (upsert update/insert/conflict
override; deep nested recursion; element-wise array merge; shallow
fallback), 19/19 driver E2E, whitelist unit test green.
totalwindupflightsystems pushed a commit to totalwindupflightsystems/rethinkdb that referenced this pull request Aug 7, 2026
…patch

Fix regex for matching server version
totalwindupflightsystems pushed a commit to totalwindupflightsystems/rethinkdb that referenced this pull request Aug 7, 2026
Fix for Twisted driver Python 3 compatibility and some corner cases
totalwindupflightsystems added a commit to totalwindupflightsystems/rethinkdb that referenced this pull request Aug 7, 2026
QUEUE rethinkdb#1 of the approved PHASE3 roadmap.

UPSERT (term 216):
- table.upsert(docs) = insert with conflict='update' semantics by default,
  Postgres ON CONFLICT DO UPDATE parity. Same optargs as insert
  (conflict, durability, return_changes, ...); an explicit
  optarg overrides the default.
- Implemented by parameterizing insert_term_t with a conflict default
  and subclassing — zero duplicated write logic.

MERGE_DEEP (term 217):
- Postgres-style deep merge. Stock  already recurses into nested
  objects but REPLACES arrays wholesale; merge_deep also descends into
  arrays element-wise (by position), merging object elements and
  extending longer right arrays.  falls back to stock
  behavior.
- Added  to the global acceptable-optargs whitelist (it was
  missing, causing a compile-time sanity-check crash).

Driver: regenerated ql2_pb2.py, Upsert + MergeDeep query classes, and
table.upsert()/expr().merge_deep() methods. Whitelist regression test
extended to cover both new term IDs.

Verified live: 9/9 merge E2E assertions (upsert update/insert/conflict
override; deep nested recursion; element-wise array merge; shallow
fallback), 19/19 driver E2E, whitelist unit test green.

Co-authored-by: Alexis Okuwa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants