mirror of https://gitee.com/bigwinds/arangodb
Fix ArangoSearch consolidation results commit (3.5 backport) (#10370)
* Fix ported from upstream * Update CHANGELOG
This commit is contained in:
parent
b186aebd8d
commit
89b21f3c73
|
@ -2038,6 +2038,11 @@ index_writer::pending_context_t index_writer::flush_all(const before_commit_f& b
|
||||||
// pending consolidation request
|
// pending consolidation request
|
||||||
pending_candidates_count += candidates.size();
|
pending_candidates_count += candidates.size();
|
||||||
} else {
|
} else {
|
||||||
|
// during consolidation doc_mask could be already populated even for just merged segment
|
||||||
|
if (pending_segment.segment.meta.docs_count != pending_segment.segment.meta.live_docs_count) {
|
||||||
|
index_utils::read_document_mask(docs_mask, dir, pending_segment.segment.meta);
|
||||||
|
}
|
||||||
|
bool docs_mask_modified = false;
|
||||||
// pending already imported/consolidated segment, apply deletes
|
// pending already imported/consolidated segment, apply deletes
|
||||||
// mask documents matching filters from segment_contexts (i.e. from new operations)
|
// mask documents matching filters from segment_contexts (i.e. from new operations)
|
||||||
for (auto& modifications: ctx->pending_segment_contexts_) {
|
for (auto& modifications: ctx->pending_segment_contexts_) {
|
||||||
|
@ -2052,7 +2057,7 @@ index_writer::pending_context_t index_writer::flush_all(const before_commit_f& b
|
||||||
modifications_end - modifications_begin
|
modifications_end - modifications_begin
|
||||||
);
|
);
|
||||||
|
|
||||||
add_document_mask_modified_records(
|
docs_mask_modified |= add_document_mask_modified_records(
|
||||||
modification_queries,
|
modification_queries,
|
||||||
docs_mask,
|
docs_mask,
|
||||||
cached_readers_, // reader cache for segments
|
cached_readers_, // reader cache for segments
|
||||||
|
@ -2060,6 +2065,11 @@ index_writer::pending_context_t index_writer::flush_all(const before_commit_f& b
|
||||||
pending_segment.generation
|
pending_segment.generation
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if mask left untouched, reset it, to prevent unnecessary writes
|
||||||
|
if (!docs_mask_modified) {
|
||||||
|
docs_mask.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip empty segments
|
// skip empty segments
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
v3.5.3 (XXXX-XX-XX)
|
v3.5.3 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Fixed ArangoSearch index removes being discarded on commiting consolidation
|
||||||
|
results with pending removes after some segments under consolidation were
|
||||||
|
already committed.
|
||||||
|
|
||||||
* Assertion fail when no timestamp in agency's persistence.
|
* Assertion fail when no timestamp in agency's persistence.
|
||||||
|
|
||||||
* Fixed internal issue #647: custom analyzer provokes errors on Active Failover
|
* Fixed internal issue #647: custom analyzer provokes errors on Active Failover
|
||||||
|
|
Loading…
Reference in New Issue