We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
havenask/aios/indexlib/indexlib/merger/multi_part_segment_directory.cpp
Line 153 in 9ed41ae
string MultiPartSegmentDirectory::GetLatestCounterMapContent() const { if (mPartSegIds.empty()) { return CounterMap::EMPTY_COUNTER_MAP_JSON; } CounterMap mergedCounterMap; for (const auto& segVec : mPartSegIds) { if (segVec.empty()) { continue; } segmentid_t lastSegIdOfPartition = segVec.back(); mergedCounterMap.Merge( GetCounterMapContent(mSegments.at(lastSegIdOfPartition)), CounterBase::FJT_MERGE); } return mergedCounterMap.ToJsonString(); }
这段Counter merge的代码有问题,merge出来State类型的counter会覆盖,所以deletedDocCount和partitionDocCount这两个counter的值是错误的。
{"__type__":"DIR","offline":{"__type__":"DIR","build":{"__type__":"DIR","addDocCount":{"__type__":"ACC","value":2000},"deleteDocCount":{"__type__":"ACC","value":0},"updateDocCount":{"__type__":"ACC","value":0}},"deletedDocCount":{"__type__":"STATE","value":0},"partitionDocCount":{"__type__":"STATE","value":1000}}
将两个partition合并,会出现这种情况,ACC了2000次,有2000个doc,但是partitionDocCount的值只有1000。
The text was updated successfully, but these errors were encountered:
是的,多 partition 合并时,对于一些 state 类型的指标也应该累加。
Sorry, something went wrong.
@yulei666 有时间可以提交一个 pr 来 fix 一下么
可以啊
fix multi part merger counter bug (#32)
434d4d1
fix the bug of #31 Signed-off-by: Yu Lei <yulei666@126.com> Co-authored-by: Yu Lei <lei.yu@shopee.com>
No branches or pull requests
havenask/aios/indexlib/indexlib/merger/multi_part_segment_directory.cpp
Line 153 in 9ed41ae
这段Counter merge的代码有问题,merge出来State类型的counter会覆盖,所以deletedDocCount和partitionDocCount这两个counter的值是错误的。
将两个partition合并,会出现这种情况,ACC了2000次,有2000个doc,但是partitionDocCount的值只有1000。
The text was updated successfully, but these errors were encountered: