Skip to content

Commit

Permalink
[fix] can't show edge after clone space (#3351)
Browse files Browse the repository at this point in the history
* fix a bug may stuck

* update

* create space as can't show edge

* add tck test case

* do fmt tck test
  • Loading branch information
liuyu85cn committed Nov 26, 2021
1 parent a14d7b4 commit ddb9ea4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/meta/processors/parts/CreateSpaceAsProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ErrorOr<nebula::cpp2::ErrorCode, std::vector<kvstore::KV>> CreateSpaceAsProcesso
auto edgeType = MetaKeyUtils::parseEdgeType(iter->key());
auto edgeNameLen = *reinterpret_cast<const int32_t *>(val.data());
auto edgeName = val.subpiece(sizeof(int32_t), edgeNameLen).str();
data.emplace_back(MetaKeyUtils::indexTagKey(newSpaceId, edgeName),
data.emplace_back(MetaKeyUtils::indexEdgeKey(newSpaceId, edgeName),
std::string(reinterpret_cast<const char *>(&edgeType), sizeof(edgeType)));

auto ver = MetaKeyUtils::parseEdgeVersion(iter->key());
Expand Down
7 changes: 7 additions & 0 deletions tests/tck/features/schema/CreateSpaceAs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ Feature: Create space as another space
Then the result should be, in any order:
| Name |
| "e1" |
When executing query:
"""
show create edge e1;
"""
Then the result should be, in any order:
| Edge | Create Edge |
| "e1" | 'CREATE EDGE `e1` (\n `col1` int64 NULL\n) ttl_duration = 0, ttl_col = ""' |
When executing query:
"""
show tag indexes;
Expand Down

0 comments on commit ddb9ea4

Please sign in to comment.