diff options
Diffstat (limited to 'searchcore/src/vespa/searchcorespi/index')
59 files changed, 286 insertions, 214 deletions
diff --git a/searchcore/src/vespa/searchcorespi/index/CMakeLists.txt b/searchcore/src/vespa/searchcorespi/index/CMakeLists.txt index ca33131d7f4..3ce2b4a3f8a 100644 --- a/searchcore/src/vespa/searchcorespi/index/CMakeLists.txt +++ b/searchcore/src/vespa/searchcorespi/index/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_library(searchcorespi_index STATIC OBJECT SOURCES diskindexcleaner.cpp diff --git a/searchcore/src/vespa/searchcorespi/index/disk_index_stats.cpp b/searchcore/src/vespa/searchcorespi/index/disk_index_stats.cpp index 1b77061de8c..521f70fa533 100644 --- a/searchcore/src/vespa/searchcorespi/index/disk_index_stats.cpp +++ b/searchcore/src/vespa/searchcorespi/index/disk_index_stats.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "disk_index_stats.h" #include "idiskindex.h" diff --git a/searchcore/src/vespa/searchcorespi/index/disk_index_stats.h b/searchcore/src/vespa/searchcorespi/index/disk_index_stats.h index 831d95e95c1..cba2c40402b 100644 --- a/searchcore/src/vespa/searchcorespi/index/disk_index_stats.h +++ b/searchcore/src/vespa/searchcorespi/index/disk_index_stats.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "index_searchable_stats.h" diff --git a/searchcore/src/vespa/searchcorespi/index/disk_indexes.cpp b/searchcore/src/vespa/searchcorespi/index/disk_indexes.cpp index 28f6a886d06..096bdb64e5a 100644 --- a/searchcore/src/vespa/searchcorespi/index/disk_indexes.cpp +++ b/searchcore/src/vespa/searchcorespi/index/disk_indexes.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "disk_indexes.h" #include "indexdisklayout.h" diff --git a/searchcore/src/vespa/searchcorespi/index/disk_indexes.h b/searchcore/src/vespa/searchcorespi/index/disk_indexes.h index 842c1814faf..a98f43d35ab 100644 --- a/searchcore/src/vespa/searchcorespi/index/disk_indexes.h +++ b/searchcore/src/vespa/searchcorespi/index/disk_indexes.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.cpp b/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.cpp index 8126774078e..5849fdad344 100644 --- a/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.cpp +++ b/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "diskindexcleaner.h" #include "disk_indexes.h" diff --git a/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.h b/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.h index cbd3a5aa94f..bdf018e93a0 100644 --- a/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.h +++ b/searchcore/src/vespa/searchcorespi/index/diskindexcleaner.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/eventlogger.cpp b/searchcore/src/vespa/searchcorespi/index/eventlogger.cpp index 7a5b1bf907a..5e07a940dba 100644 --- a/searchcore/src/vespa/searchcorespi/index/eventlogger.cpp +++ b/searchcore/src/vespa/searchcorespi/index/eventlogger.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "eventlogger.h" #include <vespa/searchlib/util/logutil.h> diff --git a/searchcore/src/vespa/searchcorespi/index/eventlogger.h b/searchcore/src/vespa/searchcorespi/index/eventlogger.h index 6191543dcb3..ff7e4eba313 100644 --- a/searchcore/src/vespa/searchcorespi/index/eventlogger.h +++ b/searchcore/src/vespa/searchcorespi/index/eventlogger.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/stllike/string.h> diff --git a/searchcore/src/vespa/searchcorespi/index/fakeindexsearchable.h b/searchcore/src/vespa/searchcorespi/index/fakeindexsearchable.h index b652388a560..be86f3d30c6 100644 --- a/searchcore/src/vespa/searchcorespi/index/fakeindexsearchable.h +++ b/searchcore/src/vespa/searchcorespi/index/fakeindexsearchable.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/fusionrunner.cpp b/searchcore/src/vespa/searchcorespi/index/fusionrunner.cpp index 1d63e883245..211fa36c305 100644 --- a/searchcore/src/vespa/searchcorespi/index/fusionrunner.cpp +++ b/searchcore/src/vespa/searchcorespi/index/fusionrunner.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "fusionrunner.h" #include "eventlogger.h" diff --git a/searchcore/src/vespa/searchcorespi/index/fusionrunner.h b/searchcore/src/vespa/searchcorespi/index/fusionrunner.h index 92ad42b76ad..a375ec57409 100644 --- a/searchcore/src/vespa/searchcorespi/index/fusionrunner.h +++ b/searchcore/src/vespa/searchcorespi/index/fusionrunner.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/fusionspec.h b/searchcore/src/vespa/searchcorespi/index/fusionspec.h index 0b147140e55..858f31a8dc3 100644 --- a/searchcore/src/vespa/searchcorespi/index/fusionspec.h +++ b/searchcore/src/vespa/searchcorespi/index/fusionspec.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/i_thread_service.h b/searchcore/src/vespa/searchcorespi/index/i_thread_service.h index f973908b62d..65235e6a2fe 100644 --- a/searchcore/src/vespa/searchcorespi/index/i_thread_service.h +++ b/searchcore/src/vespa/searchcorespi/index/i_thread_service.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/runnable.h> diff --git a/searchcore/src/vespa/searchcorespi/index/idiskindex.h b/searchcore/src/vespa/searchcorespi/index/idiskindex.h index 707d2029d66..fea875dee05 100644 --- a/searchcore/src/vespa/searchcorespi/index/idiskindex.h +++ b/searchcore/src/vespa/searchcorespi/index/idiskindex.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "indexsearchable.h" diff --git a/searchcore/src/vespa/searchcorespi/index/iindexcollection.cpp b/searchcore/src/vespa/searchcorespi/index/iindexcollection.cpp index 988c0084d4f..a5edc61a458 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexcollection.cpp +++ b/searchcore/src/vespa/searchcorespi/index/iindexcollection.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "iindexcollection.h" #include "idiskindex.h" #include <vespa/vespalib/stllike/asciistream.h> diff --git a/searchcore/src/vespa/searchcorespi/index/iindexcollection.h b/searchcore/src/vespa/searchcorespi/index/iindexcollection.h index c05e8b3a34c..97bc48c3cf1 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexcollection.h +++ b/searchcore/src/vespa/searchcorespi/index/iindexcollection.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/iindexmaintaineroperations.h b/searchcore/src/vespa/searchcorespi/index/iindexmaintaineroperations.h index 0b089daff7c..85e9be12c9d 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexmaintaineroperations.h +++ b/searchcore/src/vespa/searchcorespi/index/iindexmaintaineroperations.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "idiskindex.h" diff --git a/searchcore/src/vespa/searchcorespi/index/iindexmanager.cpp b/searchcore/src/vespa/searchcorespi/index/iindexmanager.cpp index 70770f6f012..08643aa5405 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexmanager.cpp +++ b/searchcore/src/vespa/searchcorespi/index/iindexmanager.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "iindexmanager.h" namespace searchcorespi { diff --git a/searchcore/src/vespa/searchcorespi/index/iindexmanager.h b/searchcore/src/vespa/searchcorespi/index/iindexmanager.h index a11ae12f26d..b6bbe416562 100644 --- a/searchcore/src/vespa/searchcorespi/index/iindexmanager.h +++ b/searchcore/src/vespa/searchcorespi/index/iindexmanager.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "indexsearchable.h" @@ -200,6 +200,15 @@ public: * @param maxFlushed The max number of flushed indexes before fusion is urgent. */ virtual void setMaxFlushed(uint32_t maxFlushed) = 0; + + /** + * Checks if we have a pending urgent flush due to a recent + * schema change (e.g. regeneration of interleaved features in + * disk indexes). + * + * @return whether an urgent flush is pending + */ + virtual bool has_pending_urgent_flush() const = 0; }; } // namespace searchcorespi diff --git a/searchcore/src/vespa/searchcorespi/index/imemoryindex.h b/searchcore/src/vespa/searchcorespi/index/imemoryindex.h index 130042bc048..d67932f32d8 100644 --- a/searchcore/src/vespa/searchcorespi/index/imemoryindex.h +++ b/searchcore/src/vespa/searchcorespi/index/imemoryindex.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "indexsearchable.h" diff --git a/searchcore/src/vespa/searchcorespi/index/index_disk_dir.h b/searchcore/src/vespa/searchcorespi/index/index_disk_dir.h index 335838ddf2e..7657656b0c8 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_disk_dir.h +++ b/searchcore/src/vespa/searchcorespi/index/index_disk_dir.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once namespace searchcorespi::index { diff --git a/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.cpp b/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.cpp index ffe33d704c8..0ef02671a17 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.cpp +++ b/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "index_disk_dir_state.h" #include <cassert> diff --git a/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.h b/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.h index d8b790b3960..36bf9637cec 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.h +++ b/searchcore/src/vespa/searchcorespi/index/index_disk_dir_state.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.cpp b/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.cpp index 1634937f094..051175be9af 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.cpp +++ b/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "index_manager_explorer.h" #include "index_manager_stats.h" @@ -76,6 +76,7 @@ IndexManagerExplorer::get_state(const Inserter &inserter, bool full) const object.setLong("lastSerialNum", _mgr->getCurrentSerialNum()); if (full) { IndexManagerStats stats(*_mgr); + object.setBool("pending_urgent_flush", _mgr->has_pending_urgent_flush()); Cursor &diskIndexArrayCursor = object.setArray("diskIndexes"); for (const auto &diskIndex : stats.getDiskIndexes()) { insertDiskIndex(diskIndexArrayCursor, diskIndex); diff --git a/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.h b/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.h index 90b0bd55615..79a0d8c9fdc 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.h +++ b/searchcore/src/vespa/searchcorespi/index/index_manager_explorer.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/index_manager_stats.cpp b/searchcore/src/vespa/searchcorespi/index/index_manager_stats.cpp index a93934c1500..06058b086fe 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_manager_stats.cpp +++ b/searchcore/src/vespa/searchcorespi/index/index_manager_stats.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "index_manager_stats.h" #include "iindexmanager.h" diff --git a/searchcore/src/vespa/searchcorespi/index/index_manager_stats.h b/searchcore/src/vespa/searchcorespi/index/index_manager_stats.h index 1e218a62660..a2f26509b66 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_manager_stats.h +++ b/searchcore/src/vespa/searchcorespi/index/index_manager_stats.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "disk_index_stats.h" diff --git a/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.cpp b/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.cpp index 92de7d2d292..f74c9c58132 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.cpp +++ b/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "index_searchable_stats.h" #include "indexsearchable.h" diff --git a/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.h b/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.h index a61245ddb5d..02364952470 100644 --- a/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.h +++ b/searchcore/src/vespa/searchcorespi/index/index_searchable_stats.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/indexcollection.cpp b/searchcore/src/vespa/searchcorespi/index/indexcollection.cpp index d69f7d1b0a4..77771032f1c 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexcollection.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexcollection.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexcollection.h" #include "indexsearchablevisitor.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexcollection.h b/searchcore/src/vespa/searchcorespi/index/indexcollection.h index 9d0949cb9de..c15afc0ce5b 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexcollection.h +++ b/searchcore/src/vespa/searchcorespi/index/indexcollection.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/indexdisklayout.cpp b/searchcore/src/vespa/searchcorespi/index/indexdisklayout.cpp index c701d1dfb1d..ebe148e5c66 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexdisklayout.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexdisklayout.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexdisklayout.h" #include "index_disk_dir.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexdisklayout.h b/searchcore/src/vespa/searchcorespi/index/indexdisklayout.h index 94b35936cc7..a577f6daf01 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexdisklayout.h +++ b/searchcore/src/vespa/searchcorespi/index/indexdisklayout.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/stllike/string.h> diff --git a/searchcore/src/vespa/searchcorespi/index/indexflushtarget.cpp b/searchcore/src/vespa/searchcorespi/index/indexflushtarget.cpp index b5a5e2c2843..4e8201f75fd 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexflushtarget.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexflushtarget.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexflushtarget.h" #include <vespa/vespalib/util/size_literals.h> @@ -44,7 +44,8 @@ IndexFlushTarget::needUrgentFlush() const // Due to limitation of 16G address space of single datastore // TODO: Even better if urgency was decided by memory index itself. bool urgent = (_numFrozenMemoryIndexes > _maxFrozenMemoryIndexes) || - (getApproxMemoryGain().gain() > ssize_t(16_Gi)); + (getApproxMemoryGain().gain() > ssize_t(16_Gi)) || + _indexMaintainer.urgent_memory_index_flush(); SerialNum flushedSerial = _indexMaintainer.getFlushedSerialNum(); LOG(debug, "Num frozen: %u Memory gain: %" PRId64 " Urgent: %d, flushedSerial=%" PRIu64, _numFrozenMemoryIndexes, getApproxMemoryGain().gain(), static_cast<int>(urgent), flushedSerial); diff --git a/searchcore/src/vespa/searchcorespi/index/indexflushtarget.h b/searchcore/src/vespa/searchcorespi/index/indexflushtarget.h index 9f524bc341d..049eaa0537e 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexflushtarget.h +++ b/searchcore/src/vespa/searchcorespi/index/indexflushtarget.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "indexmaintainer.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.cpp b/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.cpp index 562d49a4348..f889fad136f 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexfusiontarget.h" #include <cinttypes> @@ -69,7 +69,8 @@ IndexFusionTarget::getApproxDiskGain() const bool IndexFusionTarget::needUrgentFlush() const { - bool urgent = (_fusionStats.numUnfused > _fusionStats.maxFlushed) && (_fusionStats._canRunFusion); + bool urgent = (_fusionStats.numUnfused > _fusionStats.maxFlushed || _indexMaintainer.urgent_disk_index_fusion()) && + (_fusionStats._canRunFusion); LOG(debug, "Num flushed: %d Urgent: %d", _fusionStats.numUnfused, urgent); return urgent; } diff --git a/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.h b/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.h index 2be7bcc33a9..c523ddfc34e 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.h +++ b/searchcore/src/vespa/searchcorespi/index/indexfusiontarget.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "indexmaintainer.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp index f6b05f639ed..bbd17be9b5a 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -1,11 +1,14 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexmaintainer.h" +#include "disk_indexes.h" #include "diskindexcleaner.h" #include "eventlogger.h" #include "fusionrunner.h" +#include "indexcollection.h" #include "indexflushtarget.h" #include "indexfusiontarget.h" +#include "indexmaintainerconfig.h" #include "indexreadutilities.h" #include "indexwriteutilities.h" #include "index_disk_dir.h" @@ -93,13 +96,13 @@ SerialNum noSerialNumHigh = std::numeric_limits<SerialNum>::max(); class DiskIndexWithDestructorCallback : public IDiskIndex { private: std::shared_ptr<IDestructorCallback> _callback; - IDiskIndex::SP _index; + std::shared_ptr<IDiskIndex> _index; IndexDiskDir _index_disk_dir; IndexDiskLayout& _layout; DiskIndexes& _disk_indexes; public: - DiskIndexWithDestructorCallback(IDiskIndex::SP index, + DiskIndexWithDestructorCallback(std::shared_ptr<IDiskIndex> index, std::shared_ptr<IDestructorCallback> callback, IndexDiskLayout& layout, DiskIndexes& disk_indexes) noexcept @@ -116,7 +119,7 @@ public: /** * Implements searchcorespi::IndexSearchable */ - Blueprint::UP + std::unique_ptr<Blueprint> createBlueprint(const IRequestContext & requestContext, const FieldSpec &field, const Node &term) override @@ -125,7 +128,7 @@ public: fsl.add(field); return _index->createBlueprint(requestContext, fsl, term); } - Blueprint::UP + std::unique_ptr<Blueprint> createBlueprint(const IRequestContext & requestContext, const FieldSpecList &fields, const Node &term) override @@ -184,10 +187,11 @@ IndexMaintainer::FusionArgs::~FusionArgs() = default; IndexMaintainer::SetSchemaArgs::SetSchemaArgs() = default; IndexMaintainer::SetSchemaArgs::~SetSchemaArgs() = default; -uint32_t -IndexMaintainer::getNewAbsoluteId() +void +IndexMaintainer::set_id_for_new_memory_index() { - return _next_id++; + _current_index_id = _next_id++ - _last_fusion_id; + assert(_current_index_id < ISourceSelector::SOURCE_LIMIT); } string @@ -221,7 +225,7 @@ IndexMaintainer::reopenDiskIndexes(ISearchableIndexCollection &coll) LOG(error, "Could not open schema '%s'", schemaName.c_str()); } if (trimmedSchema != d->getSchema()) { - IDiskIndex::SP newIndex(reloadDiskIndex(*d)); + auto newIndex(reloadDiskIndex(*d)); coll.replace(coll.getSourceId(i), newIndex); hasReopenedAnything = true; } @@ -265,9 +269,9 @@ IndexMaintainer::updateActiveFusionPrunedSchema(const Schema &schema) { assert(_ctx.getThreadingService().master().isCurrentThread()); for (;;) { - Schema::SP activeFusionSchema; - Schema::SP activeFusionPrunedSchema; - Schema::SP newActiveFusionPrunedSchema; + std::shared_ptr<Schema> activeFusionSchema; + std::shared_ptr<Schema> activeFusionPrunedSchema; + std::shared_ptr<Schema> newActiveFusionPrunedSchema; { LockGuard lock(_state_lock); activeFusionSchema = _activeFusionSchema; @@ -276,10 +280,10 @@ IndexMaintainer::updateActiveFusionPrunedSchema(const Schema &schema) if (!activeFusionSchema) return; // No active fusion if (!activeFusionPrunedSchema) { - Schema::UP newSchema = Schema::intersect(*activeFusionSchema, schema); + auto newSchema = Schema::intersect(*activeFusionSchema, schema); newActiveFusionPrunedSchema = std::move(newSchema); } else { - Schema::UP newSchema = Schema::intersect(*activeFusionPrunedSchema, schema); + auto newSchema = Schema::intersect(*activeFusionPrunedSchema, schema); newActiveFusionPrunedSchema = std::move(newSchema); } { @@ -302,7 +306,7 @@ IndexMaintainer::deactivateDiskIndexes(vespalib::string indexDir) removeOldDiskIndexes(); } -IDiskIndex::SP +std::shared_ptr<IDiskIndex> IndexMaintainer::loadDiskIndex(const string &indexDir) { // Called by a flush worker thread OR CTOR (in document db init executor thread) @@ -323,7 +327,7 @@ IndexMaintainer::loadDiskIndex(const string &indexDir) return retval; } -IDiskIndex::SP +std::shared_ptr<IDiskIndex> IndexMaintainer::reloadDiskIndex(const IDiskIndex &oldIndex) { // Called by a flush worker thread OR document db executor thread @@ -346,7 +350,7 @@ IndexMaintainer::reloadDiskIndex(const IDiskIndex &oldIndex) return retval; } -IDiskIndex::SP +std::shared_ptr<IDiskIndex> IndexMaintainer::flushMemoryIndex(IMemoryIndex &memoryIndex, uint32_t indexId, uint32_t docIdLimit, @@ -356,7 +360,7 @@ IndexMaintainer::flushMemoryIndex(IMemoryIndex &memoryIndex, // Called by a flush worker thread const string flushDir = getFlushDir(indexId); memoryIndex.flushToDisk(flushDir, docIdLimit, serialNum); - Schema::SP prunedSchema(memoryIndex.getPrunedSchema()); + auto prunedSchema(memoryIndex.getPrunedSchema()); if (prunedSchema) { updateDiskIndexSchema(flushDir, *prunedSchema, noSerialNumHigh); } @@ -366,8 +370,8 @@ IndexMaintainer::flushMemoryIndex(IMemoryIndex &memoryIndex, return loadDiskIndex(flushDir); } -ISearchableIndexCollection::UP -IndexMaintainer::loadDiskIndexes(const FusionSpec &spec, ISearchableIndexCollection::UP sourceList) +std::unique_ptr<ISearchableIndexCollection> +IndexMaintainer::loadDiskIndexes(const FusionSpec &spec, std::unique_ptr<ISearchableIndexCollection> sourceList) { // Called by CTOR (in document db init executor thread) uint32_t fusion_id = spec.last_fusion_id; @@ -386,8 +390,8 @@ namespace { using LockGuard = std::lock_guard<std::mutex>; -ISearchableIndexCollection::SP -getLeaf(const LockGuard &newSearchLock, const ISearchableIndexCollection::SP & is, bool warn=false) +std::shared_ptr<ISearchableIndexCollection> +getLeaf(const LockGuard &newSearchLock, const std::shared_ptr<ISearchableIndexCollection>& is, bool warn=false) { if (dynamic_cast<const WarmupIndexCollection *>(is.get()) != nullptr) { if (warn) { @@ -408,11 +412,11 @@ getLeaf(const LockGuard &newSearchLock, const ISearchableIndexCollection::SP & i * Caller must hold _state_lock (SL). */ void -IndexMaintainer::replaceSource(uint32_t sourceId, const IndexSearchable::SP &source) +IndexMaintainer::replaceSource(uint32_t sourceId, const std::shared_ptr<IndexSearchable>& source) { assert(_ctx.getThreadingService().master().isCurrentThread()); LockGuard lock(_new_search_lock); - ISearchableIndexCollection::UP indexes = createNewSourceCollection(lock); + auto indexes = createNewSourceCollection(lock); indexes->replace(sourceId, source); swapInNewIndex(lock, std::move(indexes), *source); } @@ -423,7 +427,7 @@ IndexMaintainer::replaceSource(uint32_t sourceId, const IndexSearchable::SP &sou */ void IndexMaintainer::swapInNewIndex(LockGuard & guard, - ISearchableIndexCollection::SP indexes, + std::shared_ptr<ISearchableIndexCollection> indexes, IndexSearchable & source) { assert(indexes->valid()); @@ -448,19 +452,19 @@ IndexMaintainer::swapInNewIndex(LockGuard & guard, * Caller must hold _state_lock (SL). */ void -IndexMaintainer::appendSource(uint32_t sourceId, const IndexSearchable::SP &source) +IndexMaintainer::appendSource(uint32_t sourceId, const std::shared_ptr<IndexSearchable>& source) { assert(_ctx.getThreadingService().master().isCurrentThread()); LockGuard lock(_new_search_lock); - ISearchableIndexCollection::UP indexes = createNewSourceCollection(lock); + auto indexes = createNewSourceCollection(lock); indexes->append(sourceId, source); swapInNewIndex(lock, std::move(indexes), *source); } -ISearchableIndexCollection::UP +std::unique_ptr<ISearchableIndexCollection> IndexMaintainer::createNewSourceCollection(const LockGuard &newSearchLock) { - ISearchableIndexCollection::SP currentLeaf(getLeaf(newSearchLock, _source_list)); + auto currentLeaf(getLeaf(newSearchLock, _source_list)); return std::make_unique<IndexCollection>(_selector, *currentLeaf); } @@ -482,13 +486,13 @@ IndexMaintainer::FlushArgs::FlushArgs(FlushArgs &&) = default; IndexMaintainer::FlushArgs & IndexMaintainer::FlushArgs::operator=(FlushArgs &&) = default; bool -IndexMaintainer::doneInitFlush(FlushArgs *args, IMemoryIndex::SP *new_index) +IndexMaintainer::doneInitFlush(FlushArgs *args, std::shared_ptr<IMemoryIndex>* new_index) { // Called by initFlush via reconfigurer assert(_ctx.getThreadingService().master().isCurrentThread()); LockGuard state_lock(_state_lock); args->old_index = _current_index; - args->old_absolute_id = _current_index_id + _last_fusion_id; + args->old_absolute_id = get_absolute_id(); args->old_source_list = _source_list; string selector_name = IndexDiskLayout::getSelectorFileName(getFlushDir(args->old_absolute_id)); args->flush_serial_num = current_serial_num(); @@ -513,9 +517,7 @@ IndexMaintainer::doneInitFlush(FlushArgs *args, IMemoryIndex::SP *new_index) if (!args->_skippedEmptyLast) { // Keep on using same source selector with extended valid range args->save_info = getSourceSelector().extractSaveInfo(selector_name); - // XXX: Overflow issue in source selector - _current_index_id = getNewAbsoluteId() - _last_fusion_id; - assert(_current_index_id < ISourceSelector::SOURCE_LIMIT); + set_id_for_new_memory_index(); _selector->setDefaultSource(_current_index_id); _source_selector_changes = 0; } @@ -604,10 +606,10 @@ IndexMaintainer::flushMemoryIndex(FlushArgs &args, // Called by a flush worker thread ChangeGens changeGens = getChangeGens(); IMemoryIndex &memoryIndex = *args.old_index; - Schema::SP prunedSchema = memoryIndex.getPrunedSchema(); - IDiskIndex::SP diskIndex = flushMemoryIndex(memoryIndex, args.old_absolute_id, - docIdLimit, args.flush_serial_num, - saveInfo); + auto prunedSchema = memoryIndex.getPrunedSchema(); + auto diskIndex = flushMemoryIndex(memoryIndex, args.old_absolute_id, + docIdLimit, args.flush_serial_num, + saveInfo); // Post processing after memory index has been written to disk and // opened as disk index. args._changeGens = changeGens; @@ -619,7 +621,7 @@ IndexMaintainer::flushMemoryIndex(FlushArgs &args, void -IndexMaintainer::reconfigureAfterFlush(FlushArgs &args, IDiskIndex::SP &diskIndex) +IndexMaintainer::reconfigureAfterFlush(FlushArgs &args, std::shared_ptr<IDiskIndex>& diskIndex) { // Called by a flush worker thread for (;;) { @@ -631,12 +633,12 @@ IndexMaintainer::reconfigureAfterFlush(FlushArgs &args, IDiskIndex::SP &diskInde return; } ChangeGens changeGens = getChangeGens(); - Schema::SP prunedSchema = args.old_index->getPrunedSchema(); + auto prunedSchema = args.old_index->getPrunedSchema(); const string indexDir = getFlushDir(args.old_absolute_id); if (prunedSchema) { updateDiskIndexSchema(indexDir, *prunedSchema, noSerialNumHigh); } - IDiskIndex::SP reloadedDiskIndex = reloadDiskIndex(*diskIndex); + auto reloadedDiskIndex = reloadDiskIndex(*diskIndex); diskIndex = reloadedDiskIndex; args._changeGens = changeGens; args._prunedSchema = prunedSchema; @@ -645,7 +647,7 @@ IndexMaintainer::reconfigureAfterFlush(FlushArgs &args, IDiskIndex::SP &diskInde bool -IndexMaintainer::doneFlush(FlushArgs *args, IDiskIndex::SP *disk_index) { +IndexMaintainer::doneFlush(FlushArgs *args, std::shared_ptr<IDiskIndex> *disk_index) { // Called by doFlush via reconfigurer assert(_ctx.getThreadingService().master().isCurrentThread()); LockGuard state_lock(_state_lock); @@ -683,7 +685,7 @@ IndexMaintainer::canRunFusion(const FusionSpec &spec) const } bool -IndexMaintainer::doneFusion(FusionArgs *args, IDiskIndex::SP *new_index) +IndexMaintainer::doneFusion(FusionArgs *args, std::shared_ptr<IDiskIndex>* new_index) { // Called by runFusion via reconfigurer assert(_ctx.getThreadingService().master().isCurrentThread()); @@ -711,13 +713,12 @@ IndexMaintainer::doneFusion(FusionArgs *args, IDiskIndex::SP *new_index) _activeFusionPrunedSchema.reset(); } - ISearchableIndexCollection::SP currentLeaf; + std::shared_ptr<ISearchableIndexCollection> currentLeaf; { LockGuard lock(_new_search_lock); currentLeaf = getLeaf(lock, _source_list); } - ISearchableIndexCollection::UP fsc = - IndexCollection::replaceAndRenumber(_selector, *currentLeaf, id_diff, *new_index); + auto fsc = IndexCollection::replaceAndRenumber(_selector, *currentLeaf, id_diff, *new_index); fsc->setCurrentIndex(_current_index_id); { @@ -732,7 +733,7 @@ IndexMaintainer::makeSureAllRemainingWarmupIsDone(std::shared_ptr<WarmupIndexCol { // called by warmupDone via reconfigurer, warmupDone() doesn't wait for us assert(_ctx.getThreadingService().master().isCurrentThread()); - ISearchableIndexCollection::SP warmIndex; + std::shared_ptr<ISearchableIndexCollection> warmIndex; { LockGuard state_lock(_state_lock); if (keepAlive == _source_list) { @@ -767,26 +768,8 @@ IndexMaintainer::warmupDone(std::shared_ptr<WarmupIndexCollection> current) } } -namespace { - -bool -has_matching_interleaved_features(const Schema& old_schema, const Schema& new_schema) -{ - for (SchemaUtil::IndexIterator itr(new_schema); itr.isValid(); ++itr) { - if (itr.hasMatchingOldFields(old_schema) && - !itr.has_matching_use_interleaved_features(old_schema)) - { - return false; - } - } - return true; -} - -} - - void -IndexMaintainer::doneSetSchema(SetSchemaArgs &args, IMemoryIndex::SP &newIndex) +IndexMaintainer::doneSetSchema(SetSchemaArgs &args, std::shared_ptr<IMemoryIndex>& newIndex, SerialNum serial_num) { assert(_ctx.getThreadingService().master().isCurrentThread()); // with idle index executor LockGuard state_lock(_state_lock); @@ -794,11 +777,11 @@ IndexMaintainer::doneSetSchema(SetSchemaArgs &args, IMemoryIndex::SP &newIndex) args._oldSchema = _schema; // Delay destruction args._oldIndex = _current_index; // Delay destruction args._oldSourceList = _source_list; // Delay destruction - uint32_t oldAbsoluteId = _current_index_id + _last_fusion_id; + uint32_t oldAbsoluteId = get_absolute_id(); string selectorName = IndexDiskLayout::getSelectorFileName(getFlushDir(oldAbsoluteId)); SerialNum freezeSerialNum = current_serial_num(); bool dropEmptyLast = false; - SaveInfo::UP saveInfo; + std::unique_ptr<SaveInfo> saveInfo; LOG(info, "Making new schema. Id = %u. Serial num = %llu", oldAbsoluteId, (unsigned long long) freezeSerialNum); { @@ -811,20 +794,18 @@ IndexMaintainer::doneSetSchema(SetSchemaArgs &args, IMemoryIndex::SP &newIndex) if (!dropEmptyLast) { // Keep on using same source selector with extended valid range saveInfo = getSourceSelector().extractSaveInfo(selectorName); - // XXX: Overflow issue in source selector - _current_index_id = getNewAbsoluteId() - _last_fusion_id; - assert(_current_index_id < ISourceSelector::SOURCE_LIMIT); + set_id_for_new_memory_index(); _selector->setDefaultSource(_current_index_id); // Extra index to flush next time flushing is performed _frozenMemoryIndexes.emplace_back(args._oldIndex, freezeSerialNum, std::move(saveInfo), oldAbsoluteId); } _current_index = newIndex; - // Non-matching interleaved features in schemas means that we need to - // reconstruct or drop interleaved features in posting lists. - // If so, we must flush the new index to disk even if it is empty. - // This ensures that 2x triggerFlush will run fusion - // to reconstruct or drop interleaved features in the posting lists. - _flush_empty_current_index = !has_matching_interleaved_features(args._oldSchema, args._newSchema); + if (serial_num > flush_serial_num() && get_absolute_id() > 1) { + consider_urgent_flush(args._oldSchema, args._newSchema, get_absolute_id()); + } + // If schema changes triggered a need for urgent flush then we must + // be able to flush the new index to disk even if it is empty. + _flush_empty_current_index = (_urgent_flush_id == get_absolute_id()); } if (dropEmptyLast) { replaceSource(_current_index_id, _current_index); @@ -842,7 +823,7 @@ IndexMaintainer::getSchema(void) const return _schema; } -Schema::SP +std::shared_ptr<Schema> IndexMaintainer::getActiveFusionPrunedSchema(void) const { LockGuard lock(_index_update_lock); @@ -888,6 +869,7 @@ IndexMaintainer::IndexMaintainer(const IndexMaintainerConfig &config, _last_fusion_id(), _next_id(), _current_index_id(), + _urgent_flush_id(), _current_index(), _flush_empty_current_index(false), _current_serial_num(0), @@ -938,8 +920,7 @@ IndexMaintainer::IndexMaintainer(const IndexMaintainerConfig &config, _selector = getSourceSelector().cloneAndSubtract(ost.str(), id_diff); assert(_last_fusion_id == _selector->getBaseId()); } - _current_index_id = getNewAbsoluteId() - _last_fusion_id; - assert(_current_index_id < ISourceSelector::SOURCE_LIMIT); + set_id_for_new_memory_index(); _selector->setDefaultSource(_current_index_id); auto sourceList = loadDiskIndexes(spec, std::make_unique<IndexCollection>(_selector)); _current_index = operations.createMemoryIndex(_schema, *sourceList, current_serial_num()); @@ -952,6 +933,7 @@ IndexMaintainer::IndexMaintainer(const IndexMaintainerConfig &config, pruneRemovedFields(_schema, config.getSerialNum()); })); _ctx.getThreadingService().master().sync(); + consider_initial_urgent_flush(); } IndexMaintainer::~IndexMaintainer() @@ -961,7 +943,7 @@ IndexMaintainer::~IndexMaintainer() _selector.reset(); } -FlushTask::UP +std::unique_ptr<FlushTask> IndexMaintainer::initFlush(SerialNum serialNum, searchcorespi::FlushStats * stats) { assert(_ctx.getThreadingService().master().isCurrentThread()); // while flush engine scheduler thread waits @@ -970,7 +952,7 @@ IndexMaintainer::initFlush(SerialNum serialNum, searchcorespi::FlushStats * stat set_current_serial_num(std::max(current_serial_num(), serialNum)); } - IMemoryIndex::SP new_index(_operations.createMemoryIndex(getSchema(), *_current_index, current_serial_num())); + auto new_index(_operations.createMemoryIndex(getSchema(), *_current_index, current_serial_num())); FlushArgs args; args.stats = stats; // Ensure that all index thread tasks accessing memory index have completed. @@ -990,7 +972,7 @@ IndexMaintainer::initFlush(SerialNum serialNum, searchcorespi::FlushStats * stat LOG(debug, "No memory index to flush. Update serial number and flush time to current: " "flushSerialNum(%" PRIu64 "), lastFlushTime(%f)", flush_serial_num(), vespalib::to_s(_lastFlushTime.time_since_epoch())); - return FlushTask::UP(); + return {}; } SerialNum realSerialNum = args.flush_serial_num; return makeLambdaFlushTask([this, myargs=std::move(args)]() mutable { doFlush(std::move(myargs)); }, realSerialNum); @@ -1115,12 +1097,12 @@ IndexMaintainer::runFusion(const FusionSpec &fusion_spec, std::shared_ptr<search } const string new_fusion_dir = getFusionDir(new_fusion_id); - Schema::SP prunedSchema = getActiveFusionPrunedSchema(); + auto prunedSchema = getActiveFusionPrunedSchema(); if (prunedSchema) { updateDiskIndexSchema(new_fusion_dir, *prunedSchema, noSerialNumHigh); } ChangeGens changeGens = getChangeGens(); - IDiskIndex::SP new_index(loadDiskIndex(new_fusion_dir)); + auto new_index(loadDiskIndex(new_fusion_dir)); remove_fusion_index_guard.reset(); // Post processing after fusion operation has completed and new disk @@ -1142,7 +1124,7 @@ IndexMaintainer::runFusion(const FusionSpec &fusion_spec, std::shared_ptr<search if (prunedSchema) { updateDiskIndexSchema(new_fusion_dir, *prunedSchema, noSerialNumHigh); } - IDiskIndex::SP diskIndex2; + std::shared_ptr<IDiskIndex> diskIndex2; diskIndex2 = reloadDiskIndex(*new_index); new_index = diskIndex2; args._changeGens = changeGens; @@ -1196,7 +1178,7 @@ IndexMaintainer::getFusionStats() const { // Called by flush engine scheduler thread (from getFlushTargets()) FusionStats stats; - IndexSearchable::SP source_list; + std::shared_ptr<IndexSearchable> source_list; { LockGuard lock(_new_search_lock); @@ -1315,14 +1297,14 @@ IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum) { assert(_ctx.getThreadingService().master().isCurrentThread()); pruneRemovedFields(schema, serialNum); - IMemoryIndex::SP new_index(_operations.createMemoryIndex(schema, *_current_index, current_serial_num())); + auto new_index(_operations.createMemoryIndex(schema, *_current_index, current_serial_num())); SetSchemaArgs args; args._newSchema = schema; // Ensure that all index thread tasks accessing memory index have completed. commit_and_wait(); // Everything should be quiet now. - doneSetSchema(args, new_index); + doneSetSchema(args, new_index, serialNum); // Source collection has now changed, caller must reconfigure further // as appropriate. } @@ -1331,8 +1313,8 @@ void IndexMaintainer::pruneRemovedFields(const Schema &schema, SerialNum serialNum) { assert(_ctx.getThreadingService().master().isCurrentThread()); - ISearchableIndexCollection::SP new_source_list; - IIndexCollection::SP coll = getSourceCollection(); + std::shared_ptr<ISearchableIndexCollection> new_source_list; + auto coll = getSourceCollection(); updateIndexSchemas(*coll, schema, serialNum); updateActiveFusionPrunedSchema(schema); { @@ -1360,4 +1342,78 @@ IndexMaintainer::setMaxFlushed(uint32_t maxFlushed) _maxFlushed = maxFlushed; } +void +IndexMaintainer::consider_urgent_flush(const Schema& old_schema, const Schema& new_schema, uint32_t flush_id) +{ + // Non-matching interleaved features in schemas means that we need to + // reconstruct or drop interleaved features in posting lists. Schedule + // urgent flush until all indexes are in sync. + for (SchemaUtil::IndexIterator itr(new_schema); itr.isValid(); ++itr) { + if (itr.hasMatchingOldFields(old_schema) && + !itr.has_matching_use_interleaved_features(old_schema)) + { + _urgent_flush_id = flush_id; + break; + } + } +} + +void +IndexMaintainer::consider_initial_urgent_flush() +{ + const Schema *prev_schema = nullptr; + auto coll = getSourceCollection(); + uint32_t count = coll->getSourceCount(); + for (uint32_t i = 0; i < count; ++i) { + IndexSearchable &is = coll->getSearchable(i); + const auto *const d = dynamic_cast<const DiskIndexWithDestructorCallback *>(&is); + if (d != nullptr) { + auto schema = &d->getSchema(); + if (prev_schema != nullptr) { + consider_urgent_flush(*prev_schema, *schema, _last_fusion_id + coll->getSourceId(i)); + } + prev_schema = schema; + } + } +} + +uint32_t +IndexMaintainer::get_urgent_flush_id() const +{ + LockGuard lock(_index_update_lock); + return _urgent_flush_id; +} + +bool +IndexMaintainer::urgent_memory_index_flush() const +{ + LockGuard lock(_index_update_lock); + for (auto& frozen : _frozenMemoryIndexes) { + if (frozen._absoluteId == _urgent_flush_id) { + return true; + } + } + if (get_absolute_id() == _urgent_flush_id) { + return true; + } + return false; +} + +bool +IndexMaintainer::urgent_disk_index_fusion() const +{ + uint32_t urgent_flush_id = get_urgent_flush_id(); + LockGuard lock(_fusion_lock); + auto& flush_ids = _fusion_spec.flush_ids; + return std::find(flush_ids.begin(), flush_ids.end(), urgent_flush_id) != std::end(flush_ids); +} + +bool +IndexMaintainer::has_pending_urgent_flush() const +{ + uint32_t urgent_flush_id = get_urgent_flush_id(); + LockGuard lock(_fusion_lock); + return urgent_flush_id > _fusion_spec.last_fusion_id; +} + } diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h index 5cf8c2f67d5..6db588d83ac 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainer.h @@ -1,19 +1,12 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "iindexmanager.h" -#include "disk_indexes.h" #include "fusionspec.h" -#include "idiskindex.h" #include "iindexmaintaineroperations.h" #include "indexdisklayout.h" -#include "indexmaintainerconfig.h" #include "indexmaintainercontext.h" -#include "imemoryindex.h" #include "warmupindexcollection.h" -#include "ithreadingservice.h" -#include "indexsearchable.h" -#include "indexcollection.h" #include <vespa/searchcorespi/flush/iflushtarget.h> #include <vespa/searchcorespi/flush/flushstats.h> #include <vespa/searchlib/attribute/fixedsourceselector.h> @@ -27,6 +20,9 @@ namespace vespalib { class Gate; } namespace searchcorespi::index { +class DiskIndexes; +class IndexMaintainerConfig; + /** * The IndexMaintainer provides a holistic view of a set of disk and * memory indexes. It allows updating the active memory index, enables search @@ -42,16 +38,15 @@ class IndexMaintainer : public IIndexManager, public: using SaveInfo = search::FixedSourceSelector::SaveInfo; using SerialNum = search::SerialNum; - using SaveInfoSP = std::shared_ptr<SaveInfo>; - IMemoryIndex::SP _index; - SerialNum _serialNum; - SaveInfoSP _saveInfo; - uint32_t _absoluteId; + std::shared_ptr<IMemoryIndex> _index; + SerialNum _serialNum; + std::shared_ptr<SaveInfo> _saveInfo; + uint32_t _absoluteId; - FrozenMemoryIndexRef(const IMemoryIndex::SP &index, + FrozenMemoryIndexRef(const std::shared_ptr<IMemoryIndex> &index, SerialNum serialNum, - SaveInfo::UP saveInfo, + std::unique_ptr<SaveInfo> saveInfo, uint32_t absoluteId) : _index(index), _serialNum(serialNum), @@ -78,20 +73,21 @@ class IndexMaintainer : public IIndexManager, const vespalib::string _base_dir; const WarmupConfig _warmupConfig; - DiskIndexes::SP _disk_indexes; + std::shared_ptr<DiskIndexes> _disk_indexes; IndexDiskLayout _layout; - Schema _schema; // Protected by SL + IUL - Schema::SP _activeFusionSchema; // Protected by SL + IUL + Schema _schema; // Protected by SL + IUL + std::shared_ptr<Schema> _activeFusionSchema; // Protected by SL + IUL // Protected by SL + IUL - Schema::SP _activeFusionPrunedSchema; + std::shared_ptr<Schema> _activeFusionPrunedSchema; uint32_t _source_selector_changes; // Protected by IUL // _selector is protected by SL + IUL - ISourceSelector::SP _selector; - ISearchableIndexCollection::SP _source_list; // Protected by SL + NSL, only set by master thread + std::shared_ptr<ISourceSelector> _selector; + std::shared_ptr<ISearchableIndexCollection> _source_list; // Protected by SL + NSL, only set by master thread uint32_t _last_fusion_id; // Protected by SL + IUL uint32_t _next_id; // Protected by SL + IUL uint32_t _current_index_id; // Protected by SL + IUL - IMemoryIndex::SP _current_index; // Protected by SL + IUL + uint32_t _urgent_flush_id; // Protected by SL + IUL + std::shared_ptr<IMemoryIndex> _current_index; // Protected by SL + IUL bool _flush_empty_current_index; std::atomic<SerialNum> _current_serial_num;// Writes protected by IUL std::atomic<SerialNum> _flush_serial_num; // Writes protected by SL @@ -130,24 +126,26 @@ class IndexMaintainer : public IIndexManager, * and pruning of removed fields, since this will trigger more retries for * some of the operations. */ - std::mutex _state_lock; // Outer lock (SL) - mutable std::mutex _index_update_lock; // Inner lock (IUL) - mutable std::mutex _new_search_lock; // Inner lock (NSL) - std::mutex _remove_lock; // Lock for removing indexes. - // Protected by SL + IUL - FusionSpec _fusion_spec; // Protected by FL - mutable std::mutex _fusion_lock; // Fusion spec lock (FL) - uint32_t _maxFlushed; - uint32_t _maxFrozen; - ChangeGens _changeGens; // Protected by SL + IUL - std::mutex _schemaUpdateLock; // Serialize rewrite of schema + std::mutex _state_lock; // Outer lock (SL) + mutable std::mutex _index_update_lock; // Inner lock (IUL) + mutable std::mutex _new_search_lock; // Inner lock (NSL) + std::mutex _remove_lock; // Lock for removing indexes. + FusionSpec _fusion_spec; // Protected by FL + mutable std::mutex _fusion_lock; // Fusion spec lock (FL) + uint32_t _maxFlushed; // Protected by NSL + const uint32_t _maxFrozen; + ChangeGens _changeGens; // Protected by SL + IUL + std::mutex _schemaUpdateLock; // Serialize rewrite of schema const search::TuneFileAttributes _tuneFileAttributes; const IndexMaintainerContext _ctx; - IIndexMaintainerOperations &_operations; + IIndexMaintainerOperations& _operations; search::FixedSourceSelector & getSourceSelector() { return static_cast<search::FixedSourceSelector &>(*_selector); } const search::FixedSourceSelector & getSourceSelector() const { return static_cast<const search::FixedSourceSelector &>(*_selector); } - uint32_t getNewAbsoluteId(); + // get absolute id of current memory index, caller holds SL or IUL + uint32_t get_absolute_id() const noexcept { return _last_fusion_id + _current_index_id; } + // set id for new memory index, other callers than constructor holds SL and IUL + void set_id_for_new_memory_index(); vespalib::string getFlushDir(uint32_t sourceId) const; vespalib::string getFusionDir(uint32_t sourceId) const; @@ -168,26 +166,26 @@ class IndexMaintainer : public IIndexManager, void updateActiveFusionPrunedSchema(const Schema &schema); void deactivateDiskIndexes(vespalib::string indexDir); - IDiskIndex::SP loadDiskIndex(const vespalib::string &indexDir); - IDiskIndex::SP reloadDiskIndex(const IDiskIndex &oldIndex); + std::shared_ptr<IDiskIndex> loadDiskIndex(const vespalib::string &indexDir); + std::shared_ptr<IDiskIndex> reloadDiskIndex(const IDiskIndex &oldIndex); - IDiskIndex::SP flushMemoryIndex(IMemoryIndex &memoryIndex, - uint32_t indexId, - uint32_t docIdLimit, - SerialNum serialNum, - search::FixedSourceSelector::SaveInfo &saveInfo); + std::shared_ptr<IDiskIndex> flushMemoryIndex(IMemoryIndex &memoryIndex, + uint32_t indexId, + uint32_t docIdLimit, + SerialNum serialNum, + search::FixedSourceSelector::SaveInfo &saveInfo); - ISearchableIndexCollection::UP loadDiskIndexes(const FusionSpec &spec, ISearchableIndexCollection::UP sourceList); - void replaceSource(uint32_t sourceId, const IndexSearchable::SP &source); - void appendSource(uint32_t sourceId, const IndexSearchable::SP &source); - void swapInNewIndex(LockGuard & guard, ISearchableIndexCollection::SP indexes, IndexSearchable & source); - ISearchableIndexCollection::UP createNewSourceCollection(const LockGuard &newSearchLock); + std::unique_ptr<ISearchableIndexCollection> loadDiskIndexes(const FusionSpec &spec, std::unique_ptr<ISearchableIndexCollection> sourceList); + void replaceSource(uint32_t sourceId, const std::shared_ptr<IndexSearchable>& source); + void appendSource(uint32_t sourceId, const std::shared_ptr<IndexSearchable>& source); + void swapInNewIndex(LockGuard & guard, std::shared_ptr<ISearchableIndexCollection> indexes, IndexSearchable & source); + std::unique_ptr<ISearchableIndexCollection> createNewSourceCollection(const LockGuard &newSearchLock); struct FlushArgs { - IMemoryIndex::SP old_index; // Last memory index + std::shared_ptr<IMemoryIndex> old_index; // Last memory index uint32_t old_absolute_id; - ISearchableIndexCollection::SP old_source_list; // Delays destruction - search::FixedSourceSelector::SaveInfo::SP save_info; + std::shared_ptr<ISearchableIndexCollection> old_source_list; // Delays destruction + std::shared_ptr<search::FixedSourceSelector::SaveInfo> save_info; SerialNum flush_serial_num; searchcorespi::FlushStats * stats; bool _skippedEmptyLast; // Don't flush empty memory index @@ -198,7 +196,7 @@ class IndexMaintainer : public IIndexManager, // or data structure limitations). FrozenMemoryIndexRefs _extraIndexes; ChangeGens _changeGens; - Schema::SP _prunedSchema; + std::shared_ptr<Schema> _prunedSchema; FlushArgs(); FlushArgs(const FlushArgs &) = delete; @@ -208,15 +206,15 @@ class IndexMaintainer : public IIndexManager, ~FlushArgs(); }; - bool doneInitFlush(FlushArgs *args, IMemoryIndex::SP *new_index); + bool doneInitFlush(FlushArgs *args, std::shared_ptr<IMemoryIndex> *new_index); void doFlush(FlushArgs args); void flushFrozenMemoryIndexes(FlushArgs &args, FlushIds &flushIds); void flushLastMemoryIndex(FlushArgs &args, FlushIds &flushIds); void updateFlushStats(const FlushArgs &args); void flushMemoryIndex(FlushArgs &args, uint32_t docIdLimit, search::FixedSourceSelector::SaveInfo &saveInfo, FlushIds &flushIds); - void reconfigureAfterFlush(FlushArgs &args, IDiskIndex::SP &diskIndex); - bool doneFlush(FlushArgs *args, IDiskIndex::SP *disk_index); + void reconfigureAfterFlush(FlushArgs &args, std::shared_ptr<IDiskIndex>& diskIndex); + bool doneFlush(FlushArgs *args, std::shared_ptr<IDiskIndex> *disk_index); class FusionArgs { @@ -224,8 +222,8 @@ class IndexMaintainer : public IIndexManager, uint32_t _new_fusion_id; ChangeGens _changeGens; Schema _schema; - Schema::SP _prunedSchema; - ISearchableIndexCollection::SP _old_source_list; // Delays destruction + std::shared_ptr<Schema> _prunedSchema; + std::shared_ptr<ISearchableIndexCollection> _old_source_list; // Delays destruction FusionArgs(); ~FusionArgs(); @@ -233,23 +231,23 @@ class IndexMaintainer : public IIndexManager, void scheduleFusion(const FlushIds &flushIds); bool canRunFusion(const FusionSpec &spec) const; - bool doneFusion(FusionArgs *args, IDiskIndex::SP *new_index); + bool doneFusion(FusionArgs *args, std::shared_ptr<IDiskIndex> *new_index); class SetSchemaArgs { public: Schema _newSchema; Schema _oldSchema; - IMemoryIndex::SP _oldIndex; - ISearchableIndexCollection::SP _oldSourceList; // Delays destruction + std::shared_ptr<IMemoryIndex> _oldIndex; + std::shared_ptr<ISearchableIndexCollection> _oldSourceList; // Delays destruction SetSchemaArgs(); ~SetSchemaArgs(); }; - void doneSetSchema(SetSchemaArgs &args, IMemoryIndex::SP &newIndex); + void doneSetSchema(SetSchemaArgs &args, std::shared_ptr<IMemoryIndex>& newIndex, SerialNum serial_num); Schema getSchema(void) const; - Schema::SP getActiveFusionPrunedSchema() const; + std::shared_ptr<Schema> getActiveFusionPrunedSchema() const; search::TuneFileAttributes getAttrTune(); ChangeGens getChangeGens(); @@ -289,7 +287,7 @@ public: * Starts a new MemoryIndex, and dumps the previous one to disk. * Updates flush stats when finished if specified. **/ - FlushTask::UP initFlush(SerialNum serialNum, FlushStats * stats); + std::unique_ptr<FlushTask> initFlush(SerialNum serialNum, FlushStats * stats); FusionSpec getFusionSpec(); /** @@ -353,12 +351,12 @@ public: return flush_serial_num(); } - IIndexCollection::SP getSourceCollection() const { + std::shared_ptr<IIndexCollection> getSourceCollection() const { LockGuard lock(_new_search_lock); return _source_list; } - searchcorespi::IndexSearchable::SP getSearchable() const override { + std::shared_ptr<searchcorespi::IndexSearchable> getSearchable() const override { LockGuard lock(_new_search_lock); return _source_list; } @@ -371,6 +369,12 @@ public: IFlushTarget::List getFlushTargets() override; void setSchema(const Schema & schema, SerialNum serialNum) override ; void setMaxFlushed(uint32_t maxFlushed) override; + void consider_urgent_flush(const Schema& old_schema, const Schema& new_schema, uint32_t flush_id); + void consider_initial_urgent_flush(); + uint32_t get_urgent_flush_id() const; + bool urgent_memory_index_flush() const; + bool urgent_disk_index_fusion() const; + bool has_pending_urgent_flush() const override; }; } diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.cpp b/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.cpp index 695de7b84ff..ca3e98de3a6 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexmaintainerconfig.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.h b/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.h index 3f890e6fa76..4e91dd59831 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.h +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainerconfig.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "warmupconfig.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.cpp b/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.cpp index efd7827fc3d..29b4cb1d9fb 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexmaintainercontext.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.h b/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.h index 2c7aa4af48e..ca147ad7706 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.h +++ b/searchcore/src/vespa/searchcorespi/index/indexmaintainercontext.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "ithreadingservice.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.cpp b/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.cpp index 8ba9efe2734..f5df775a27b 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexmanagerconfig.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.h b/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.h index decb03d97e0..3012b3d428f 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.h +++ b/searchcore/src/vespa/searchcorespi/index/indexmanagerconfig.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/config/retriever/configsnapshot.h> diff --git a/searchcore/src/vespa/searchcorespi/index/indexreadutilities.cpp b/searchcore/src/vespa/searchcorespi/index/indexreadutilities.cpp index 010a3174e1c..d3f45ec081b 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexreadutilities.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexreadutilities.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexreadutilities.h" #include "indexdisklayout.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexreadutilities.h b/searchcore/src/vespa/searchcorespi/index/indexreadutilities.h index aeafd746772..a4af2418ae3 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexreadutilities.h +++ b/searchcore/src/vespa/searchcorespi/index/indexreadutilities.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "fusionspec.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexsearchable.h b/searchcore/src/vespa/searchcorespi/index/indexsearchable.h index 84b982d5a09..8beb0ab7a61 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexsearchable.h +++ b/searchcore/src/vespa/searchcorespi/index/indexsearchable.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/indexsearchablevisitor.h b/searchcore/src/vespa/searchcorespi/index/indexsearchablevisitor.h index f85a2cf4af6..739762987f6 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexsearchablevisitor.h +++ b/searchcore/src/vespa/searchcorespi/index/indexsearchablevisitor.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.cpp b/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.cpp index 1e6265ec7c0..d2f77cfaf29 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.cpp +++ b/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "indexwriteutilities.h" #include "indexdisklayout.h" #include "indexreadutilities.h" diff --git a/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.h b/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.h index 313ab3cc1c7..d4a5319d7c2 100644 --- a/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.h +++ b/searchcore/src/vespa/searchcorespi/index/indexwriteutilities.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/searchcommon/common/schema.h> diff --git a/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.cpp b/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.cpp index 85e87965cb7..6004e45a0ef 100644 --- a/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.cpp +++ b/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "isearchableindexcollection.h" #include <vespa/searchlib/queryeval/isourceselector.h> diff --git a/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.h b/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.h index efd7062af71..bec877b2b1a 100644 --- a/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.h +++ b/searchcore/src/vespa/searchcorespi/index/isearchableindexcollection.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once diff --git a/searchcore/src/vespa/searchcorespi/index/ithreadingservice.h b/searchcore/src/vespa/searchcorespi/index/ithreadingservice.h index 4fce6f85a2b..3f3a76b5506 100644 --- a/searchcore/src/vespa/searchcorespi/index/ithreadingservice.h +++ b/searchcore/src/vespa/searchcorespi/index/ithreadingservice.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "i_thread_service.h" diff --git a/searchcore/src/vespa/searchcorespi/index/memory_index_stats.h b/searchcore/src/vespa/searchcorespi/index/memory_index_stats.h index ccc85ab4dc6..083c9026e8b 100644 --- a/searchcore/src/vespa/searchcorespi/index/memory_index_stats.h +++ b/searchcore/src/vespa/searchcorespi/index/memory_index_stats.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "index_searchable_stats.h" diff --git a/searchcore/src/vespa/searchcorespi/index/warmupconfig.h b/searchcore/src/vespa/searchcorespi/index/warmupconfig.h index 8582b7256bc..35e98069aa7 100644 --- a/searchcore/src/vespa/searchcorespi/index/warmupconfig.h +++ b/searchcore/src/vespa/searchcorespi/index/warmupconfig.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/time.h> diff --git a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp index 3403f43e150..5e3fe3ee0f5 100644 --- a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp +++ b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "warmupindexcollection.h" #include "idiskindex.h" diff --git a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h index d02f5061c34..27651b8999a 100644 --- a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h +++ b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once |