Skip to content

Conversation

bright-starry-sky
Copy link
Contributor

When insert vertex, need to check if an old index exists, if so, drop the old index and write a new index. At this point, an old index key needs to be assembled by old prop for index check, however, the old property values do not have this new column. so leads to storaged crash by CHECK(prop).
Improved this logic,When an invalid property value appears, write index skipped .

repeat step :

  • create space
  • use space
  • create tag1 (col1, col2)
  • create index1 on tag1 (col1)
  • insert vertex tag1 values (...)
  • alter tag add column col3
  • create index2 on tag1 (col3)
  • insert vertex tag1 values (...)

}
{
cpp2::ExecutionResponse resp;
auto query = "ALTER TAG person ADD (col1 int)";
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work well when we change the prop name or type? It's better to test it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does it work well when we change the prop name or type? It's better to test it.

Don't allow to alter tag change column or alter tag drop column when the tag attached index. An error message will be return.
If you want to alter tag change column or alter tag drop column , need drop index firstly.

@codecov-io
Copy link

Codecov Report

Merging #2073 into master will decrease coverage by 0.07%.
The diff coverage is 92.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2073      +/-   ##
==========================================
- Coverage   86.90%   86.83%   -0.08%     
==========================================
  Files         636      639       +3     
  Lines       59819    61129    +1310     
==========================================
+ Hits        51984    53079    +1095     
- Misses       7835     8050     +215     
Impacted Files Coverage Δ
src/common/base/Configuration.h 100.00% <ø> (ø)
src/common/utils/NebulaKeyUtils.cpp 100.00% <ø> (ø)
src/common/utils/NebulaKeyUtils.h 90.41% <ø> (ø)
src/common/utils/test/NebulaKeyUtilsTest.cpp 97.10% <ø> (ø)
src/graph/DescribeSpaceExecutor.h 0.00% <ø> (ø)
src/graph/Executor.cpp 74.76% <ø> (-0.91%) ⬇️
src/graph/Executor.h 94.73% <ø> (-5.27%) ⬇️
src/graph/FetchEdgesExecutor.h 0.00% <ø> (ø)
src/graph/FetchExecutor.cpp 88.88% <ø> (+0.59%) ⬆️
src/graph/FetchVerticesExecutor.h 0.00% <ø> (ø)
... and 211 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1584929...a06e055. Read the comment docs.

@dutor dutor merged commit a1e1e63 into vesoft-inc:master Apr 16, 2020
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants