Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(804)

Issue 2007123002: datastore: Update AllocateIDs to take keys. (Closed)

Created:
4 years, 7 months ago by dnj
Modified:
4 years, 5 months ago
Reviewers:
dnj (Google), iannucci
CC:
chromium-reviews, infra-reviews+luci-gae_chromium.org
Base URL:
https://chromium.googlesource.com/external/github.com/luci/gae@master
Target Ref:
refs/heads/master
Project:
luci-gae
Visibility:
Public.

Description

datastore: Update AllocateIDs to take keys. Update the Datastore's AllocateIDs call to accept variadic arguments similar to Get/Put/Delete/Exists. Structs can be supplied to populate their keys directly, and keys or key slices can be supplied to directly allocate keys. This adds some Key helper functions: - SameKind, which asserts that keys reference the same kind. - Partial, which returns a partial key given a source key. - WithID, which returns a derivative key with the specified ID. - NewIncompleteKeys, which allocates a slice of incomplete keys given a kind. BUG= Committed: https://github.com/luci/gae/commit/a212da0491a31a03fb1e9fb21a328ac1dc72354c

Patch Set 1 #

Total comments: 1

Patch Set 2 : Updated to use vararg, allow multiple entity types. #

Patch Set 3 : Add empty arg/key short-circuits for other varidic methods. #

Total comments: 11

Patch Set 4 : Rebase, comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+599 lines, -183 lines) Patch
M filter/count/rds.go View 1 2 3 2 chunks +3 lines, -4 lines 0 comments Download
M filter/dscache/ds.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M filter/dscache/ds_txn.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M filter/dscache/support.go View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M filter/featureBreaker/rds.go View 1 2 3 2 chunks +4 lines, -7 lines 0 comments Download
M filter/txnBuf/ds_txn.go View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M filter/txnBuf/state.go View 1 2 3 1 chunk +41 lines, -19 lines 0 comments Download
M filter/txnBuf/txnbuf_test.go View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M impl/dummy/dummy.go View 1 2 3 1 chunk +2 lines, -6 lines 0 comments Download
M impl/memory/datastore.go View 1 2 3 2 chunks +6 lines, -6 lines 0 comments Download
M impl/memory/datastore_data.go View 1 2 3 4 chunks +44 lines, -8 lines 0 comments Download
M impl/memory/datastore_test.go View 1 2 3 1 chunk +14 lines, -3 lines 0 comments Download
M impl/prod/everything_test.go View 1 2 3 1 chunk +9 lines, -2 lines 0 comments Download
M impl/prod/raw_datastore.go View 1 2 3 2 chunks +42 lines, -7 lines 0 comments Download
M service/datastore/checkfilter.go View 1 2 3 4 chunks +3 lines, -13 lines 0 comments Download
M service/datastore/checkfilter_test.go View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M service/datastore/datastore.go View 1 2 3 13 chunks +117 lines, -23 lines 0 comments Download
M service/datastore/datastore_test.go View 1 2 3 10 chunks +115 lines, -15 lines 0 comments Download
M service/datastore/finalized_query.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M service/datastore/interface.go View 1 2 3 3 chunks +35 lines, -7 lines 0 comments Download
M service/datastore/key.go View 1 2 3 5 chunks +49 lines, -11 lines 0 comments Download
M service/datastore/key_test.go View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M service/datastore/multiarg.go View 1 2 3 8 chunks +89 lines, -30 lines 0 comments Download
M service/datastore/raw_interface.go View 1 2 3 4 chunks +11 lines, -9 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (5 generated)
dnj (Google)
PTAL. iannucci@: This is in response to your comment in my cloud datastore CL that ...
4 years, 7 months ago (2016-05-24 17:57:45 UTC) #2
dnj
PTAL! I have updated this per our discussions. It now takes a variadic set of ...
4 years, 6 months ago (2016-05-31 17:16:12 UTC) #4
iannucci
awesome :) lgtm w/ nits https://chromiumcodereview.appspot.com/2007123002/diff/40001/impl/memory/datastore_data.go File impl/memory/datastore_data.go (right): https://chromiumcodereview.appspot.com/2007123002/diff/40001/impl/memory/datastore_data.go#newcode264 impl/memory/datastore_data.go:264: return -1, errors.New("disableSpecialEntities is ...
4 years, 6 months ago (2016-06-14 01:46:04 UTC) #5
dnj (Google)
Updated, cleaned up. PTAL for sanity when you get the chance. https://chromiumcodereview.appspot.com/2007123002/diff/40001/impl/memory/datastore_data.go File impl/memory/datastore_data.go (right): ...
4 years, 6 months ago (2016-06-14 04:24:18 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2007123002/60001
4 years, 5 months ago (2016-07-01 01:52:03 UTC) #9
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 01:58:34 UTC) #11
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://github.com/luci/gae/commit/a212da0491a31a03fb1e9fb21a328ac1dc72354c

Powered by Google App Engine
This is Rietveld 408576698