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

fix: delete data from associated pre-aggr table #2300

Merged
merged 2 commits into from
Aug 19, 2022

Conversation

zhanghaohit
Copy link
Collaborator

@zhanghaohit zhanghaohit commented Aug 4, 2022

#2307 has to be fixed before this PR work correctly.

@github-actions github-actions bot added the storage-engine openmldb storage engine. nameserver & tablet label Aug 4, 2022
@zhanghaohit zhanghaohit added this to the v0.6 milestone Aug 4, 2022
@zhanghaohit zhanghaohit self-assigned this Aug 4, 2022
@zhanghaohit zhanghaohit requested a review from nautaa August 4, 2022 09:33
@codecov
Copy link

codecov bot commented Aug 4, 2022

Codecov Report

Merging #2300 (1930963) into main (180f0e0) will decrease coverage by 0.01%.
The diff coverage is 96.46%.

@@             Coverage Diff              @@
##               main    #2300      +/-   ##
============================================
- Coverage     75.71%   75.70%   -0.02%     
  Complexity      368      368              
============================================
  Files           627      627              
  Lines        118168   118431     +263     
  Branches       1050     1022      -28     
============================================
+ Hits          89470    89657     +187     
- Misses        28482    28558      +76     
  Partials        216      216              
Impacted Files Coverage Δ
src/storage/aggregator.h 100.00% <ø> (ø)
src/tablet/tablet_impl.cc 61.48% <58.33%> (-0.20%) ⬇️
src/storage/aggregator.cc 75.92% <89.65%> (+0.70%) ⬆️
src/tablet/tablet_impl_test.cc 99.53% <100.00%> (+0.01%) ⬆️
...4paradigm/openmldb/batch/utils/UnsafeRowUtil.scala 44.73% <0.00%> (-39.48%) ⬇️
...s/query_response_time/deploy_query_response_time.h 81.25% <0.00%> (-18.75%) ⬇️
.../com/_4paradigm/openmldb/batch/SparkRowCodec.scala 57.47% <0.00%> (-9.98%) ⬇️
...aradigm/openmldb/batch/window/WindowComputer.scala 75.92% <0.00%> (-5.81%) ⬇️
...atistics/query_response_time/query_response_time.h 78.26% <0.00%> (-4.35%) ⬇️
.../query_response_time/deploy_query_response_time.cc 97.10% <0.00%> (-2.90%) ⬇️
... and 21 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

SDK Test Report

  79 files    79 suites   7m 12s ⏱️
167 tests 165 ✔️ 2 💤 0
209 runs  207 ✔️ 2 💤 0

Results for commit 1930963.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2022

Linux Test Report

       55 files       200 suites   51m 52s ⏱️
  9 255 tests   9 251 ✔️ 4 💤 0
13 616 runs  13 612 ✔️ 4 💤 0

Results for commit 1930963.

♻️ This comment has been updated with latest results.

@nautaa
Copy link
Collaborator

nautaa commented Aug 4, 2022

// TODO(nauta): When the base table key is deleted, the pre-aggr table needs to be deleted at the same time.
if (entry.has_method_type() && entry.method_type() == ::openmldb::api::MethodType::kDelete) {
PDLOG(WARNING, "unsupport delete method for pre-aggr table");
continue;
}

There seems to be nothing to do, you can remove the warning log.

@zhanghaohit
Copy link
Collaborator Author

// TODO(nauta): When the base table key is deleted, the pre-aggr table needs to be deleted at the same time.
if (entry.has_method_type() && entry.method_type() == ::openmldb::api::MethodType::kDelete) {
PDLOG(WARNING, "unsupport delete method for pre-aggr table");
continue;
}

There seems to be nothing to do, you can remove the warning log.

here if we found a kDelete entry, we shall do Delete(key) again, right? in case during the recover, we recover the key in the aggr_buffer_map_

@zhanghaohit zhanghaohit marked this pull request as draft August 5, 2022 10:36
@nautaa
Copy link
Collaborator

nautaa commented Aug 5, 2022

// TODO(nauta): When the base table key is deleted, the pre-aggr table needs to be deleted at the same time.
if (entry.has_method_type() && entry.method_type() == ::openmldb::api::MethodType::kDelete) {
PDLOG(WARNING, "unsupport delete method for pre-aggr table");
continue;
}

There seems to be nothing to do, you can remove the warning log.

here if we found a kDelete entry, we shall do Delete(key) again, right? in case during the recover, we recover the key in the aggr_buffer_map_

yep, you are right. aggregator maybe update in recovery phase.

@lumianph lumianph removed this from the v0.6 milestone Aug 8, 2022
@zhanghaohit zhanghaohit marked this pull request as ready for review August 9, 2022 03:23
@zhanghaohit
Copy link
Collaborator Author

merged after 060 release

Copy link
Contributor

@wuyou10206 wuyou10206 left a comment

Choose a reason for hiding this comment

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

checked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage-engine openmldb storage engine. nameserver & tablet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

delete key in pre-aggr table when delete occur in base table
6 participants