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

Add predicates for TxnKV operations #27365

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

congqixia
Copy link
Contributor

See also #26758
DesignDoc #27183
/kind enhancement

@sre-ci-robot sre-ci-robot added kind/enhancement Issues or changes related to enhancement area/compilation labels Sep 26, 2023
@sre-ci-robot sre-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines. label Sep 26, 2023
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added the dco-passed DCO check passed. label Sep 26, 2023
@mergify
Copy link
Contributor

mergify bot commented Sep 26, 2023

@congqixia E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@mergify
Copy link
Contributor

mergify bot commented Sep 26, 2023

@congqixia ut workflow job failed, comment rerun ut can trigger the job again.

func (kv *MemoryKV) MultiSaveAndRemove(saves map[string]string, removals []string) error {
func (kv *MemoryKV) MultiSaveAndRemove(saves map[string]string, removals []string, preds ...predicates.Predicate) error {
if len(preds) > 0 {
return merr.WrapErrServiceUnavailable("predicates not supported")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe return a NotImplement error is better 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mem KV does not support transaction feature
according to @yah01 this shall use ServiceUnavailable

@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

Merging #27365 (3d81e8e) into master (6539a5a) will decrease coverage by 0.01%.
Report is 6 commits behind head on master.
The diff coverage is 81.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #27365      +/-   ##
==========================================
- Coverage   81.50%   81.50%   -0.01%     
==========================================
  Files         801      803       +2     
  Lines      114371   114471     +100     
==========================================
+ Hits        93222    93294      +72     
- Misses      17965    17988      +23     
- Partials     3184     3189       +5     
Files Coverage Δ
internal/kv/etcd/util.go 100.00% <100.00%> (ø)
internal/kv/kv.go 0.00% <ø> (ø)
internal/kv/mem/mem_kv.go 72.64% <100.00%> (+1.59%) ⬆️
internal/kv/predicates/predicate.go 100.00% <100.00%> (ø)
internal/kv/rocksdb/rocksdb_kv.go 80.11% <100.00%> (+0.35%) ⬆️
pkg/util/merr/utils.go 92.74% <100.00%> (+0.10%) ⬆️
internal/kv/etcd/etcd_kv.go 81.69% <91.30%> (+0.19%) ⬆️
internal/kv/etcd/embed_etcd_kv.go 83.41% <76.92%> (-0.70%) ⬇️
internal/kv/tikv/txn_tikv.go 82.36% <56.14%> (-0.79%) ⬇️

... and 16 files with indirect coverage changes

@congqixia congqixia force-pushed the txn_kv_predicates branch 2 times, most recently from 4304d56 to e298cb5 Compare September 26, 2023 09:58
@jiaoew1991
Copy link
Contributor

/lgtm

@sre-ci-robot sre-ci-robot merged commit a3dd275 into milvus-io:master Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/compilation ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants