blob: c0716aa44b47ab8e5cc504349b43312a3c9373a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "reconfig_params.h"
namespace proton {
ReconfigParams::
ReconfigParams(const DocumentDBConfig::ComparisonResult &res)
: _res(res)
{
}
bool
ReconfigParams::configHasChanged() const
{
return _res.rankProfilesChanged ||
_res.rankingConstantsChanged ||
_res.rankingExpressionsChanged ||
_res.onnxModelsChanged ||
_res.indexschemaChanged ||
_res.attributesChanged ||
_res.summaryChanged ||
_res.juniperrcChanged ||
_res.documenttypesChanged ||
_res.documentTypeRepoChanged ||
_res.importedFieldsChanged ||
_res.tuneFileDocumentDBChanged ||
_res.schemaChanged ||
_res.maintenanceChanged ||
_res.storeChanged ||
_res.alloc_config_changed;
}
bool
ReconfigParams::shouldSchemaChange() const
{
return _res.schemaChanged;
}
bool
ReconfigParams::shouldMatchersChange() const
{
return _res.rankProfilesChanged || _res.rankingConstantsChanged || _res.rankingExpressionsChanged || _res.onnxModelsChanged || shouldSchemaChange();
}
bool
ReconfigParams::shouldIndexManagerChange() const
{
return _res.indexschemaChanged;
}
bool
ReconfigParams::shouldAttributeManagerChange() const
{
return _res.attributesChanged || _res.importedFieldsChanged || _res.visibilityDelayChanged || _res.alloc_config_changed;
}
bool
ReconfigParams::shouldSummaryManagerChange() const
{
return _res.summaryChanged || _res.juniperrcChanged
|| _res.documentTypeRepoChanged || _res.documenttypesChanged || _res.storeChanged || _res.schemaChanged;
}
bool
ReconfigParams::shouldSubDbsChange() const
{
return shouldMatchersChange() || shouldAttributeManagerChange() || shouldSummaryManagerChange()
|| _res.documentTypeRepoChanged || _res.documenttypesChanged || _res.storeChanged || _res.flushChanged;
}
bool
ReconfigParams::shouldMaintenanceControllerChange() const
{
return configHasChanged();
}
bool
ReconfigParams::shouldAttributeWriterChange() const
{
return shouldAttributeManagerChange() || _res.documentTypeRepoChanged;
}
} // namespace proton
|