Skip to content

Commit

Permalink
Merge pull request #1894 from hxy7yx/v2.8-1
Browse files Browse the repository at this point in the history
fix(add gtags): correct tag count when tag name conflict
  • Loading branch information
fengzeroz authored Mar 8, 2024
2 parents c5a6b1f + 092a8cb commit 784cc2d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/adapter/adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,12 +1287,17 @@ int neu_adapter_add_gtags(neu_adapter_t *adapter, neu_req_add_gtag_t *cmd,
cmd->groups[group_index].group,
cmd->groups[group_index].tags[added_tag_index].name);
}
for (int groups_count = 0; groups_count < cmd->n_group;
groups_count++) {

neu_adapter_driver_try_del_tag((neu_adapter_driver_t *) adapter,
cmd->groups[group_index].n_tag -
tag_index);

for (++group_index; group_index < cmd->n_group; group_index++) {
neu_adapter_driver_try_del_tag(
(neu_adapter_driver_t *) adapter,
cmd->groups[groups_count].n_tag);
cmd->groups[group_index].n_tag);
}

resp->index = 0;
resp->error = add_tag_result;
return add_tag_result;
Expand Down

0 comments on commit 784cc2d

Please sign in to comment.