mirror of https://gitee.com/bigwinds/arangodb
Fix ArangoSearch consolidation results commit (3.4 backport) (#10369)
* Fix ported from upstream * Update CHANGELOG
This commit is contained in:
parent
3810a3e2b1
commit
e670249d8c
|
@ -1821,6 +1821,11 @@ index_writer::pending_context_t index_writer::flush_all() {
|
||||||
// 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_) {
|
||||||
|
@ -1835,7 +1840,7 @@ index_writer::pending_context_t index_writer::flush_all() {
|
||||||
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
|
||||||
|
@ -1843,6 +1848,11 @@ index_writer::pending_context_t index_writer::flush_all() {
|
||||||
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.4.9 (XXX-XX-XX)
|
v3.4.9 (XXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Fixed ArangoSearch index removes being discarded on commiting consolidation
|
||||||
|
results with pending removes after some segments under consolidation were
|
||||||
|
already committed.
|
||||||
|
|
||||||
* Disallow the usage of subqueries inside AQL traversal PRUNE conditions.
|
* Disallow the usage of subqueries inside AQL traversal PRUNE conditions.
|
||||||
Using subqueries inside PRUNE conditions causes undefined behavior,
|
Using subqueries inside PRUNE conditions causes undefined behavior,
|
||||||
so such queries will now be aborted early on with a parse error
|
so such queries will now be aborted early on with a parse error
|
||||||
|
|
Loading…
Reference in New Issue