summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-10-05 15:07:50 +0200
committerHarald Musum <musum@verizonmedia.com>2020-10-05 15:07:50 +0200
commitb18ca36661a0e2dc350cf776b397de392140a09c (patch)
tree0c1f50b5dcd190167b60e29277ab132d364f79f1
parentd80ff0a5b1f6a058bc9b0497083bae572e5910d4 (diff)
parent83df87bf1ace88517ab6858e5c0a8c45ce7ad5ce (diff)
Merge branch 'master' into hmusum/change-default-value-2
-rw-r--r--hosted-tenant-base/pom.xml3
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java2
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java47
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClientTest.java19
-rw-r--r--searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp16
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp1
-rw-r--r--searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp2
-rw-r--r--searchcore/src/tests/proton/common/cachedselect_test.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp1
-rw-r--r--searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp1
-rw-r--r--searchlib/src/tests/attribute/bitvector/bitvector_test.cpp1
-rw-r--r--searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp1
-rw-r--r--searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp1
-rw-r--r--searchlib/src/tests/attribute/enum_attribute_compaction/enum_attribute_compaction_test.cpp1
-rw-r--r--searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp1
-rw-r--r--searchlib/src/tests/common/location_iterator/location_iterator_test.cpp1
-rw-r--r--searchlib/src/tests/expression/attributenode/attribute_node_test.cpp1
-rw-r--r--searchlib/src/tests/features/beta/beta_features.cpp1
-rw-r--r--searchlib/src/tests/features/prod_features.cpp1
-rw-r--r--searchlib/src/tests/fef/attributecontent/attributecontent_test.cpp2
-rw-r--r--searchlib/src/tests/queryeval/matching_elements_search/matching_elements_search_test.cpp1
-rw-r--r--searchlib/src/tests/ranksetup/ranksetup_test.cpp2
-rw-r--r--searchlib/src/tests/sortspec/multilevelsort.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/floatbase.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/attribute/integerbase.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/stringbase.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/fef/test/matchdatabuilder.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/common.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/common.h7
-rw-r--r--searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp1
33 files changed, 75 insertions, 71 deletions
diff --git a/hosted-tenant-base/pom.xml b/hosted-tenant-base/pom.xml
index 66c9f37c5c9..f0f6fec7819 100644
--- a/hosted-tenant-base/pom.xml
+++ b/hosted-tenant-base/pom.xml
@@ -201,6 +201,9 @@
<goals>
<goal>generate-test-bundle-osgi-manifest</goal>
</goals>
+ <configuration>
+ <Bundle-SymbolicName>${project.artifactId}-test</Bundle-SymbolicName>
+ </configuration>
</execution>
<execution>
<id>assemble-test-bundle</id>
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java
index e8a4620b520..48ca63b4d9e 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java
@@ -156,7 +156,7 @@ public class NodeRepository extends AbstractComponent {
// Flag is read once here as it shouldn't not change at runtime
this.useConfigServerLock = Flags.USE_CONFIG_SERVER_LOCK.bindTo(flagSource).value();
long nodeObjectCacheSize = Flags.NODE_OBJECT_CACHE_SIZE.bindTo(flagSource).value();
- this.db = new CuratorDatabaseClient(flavors, curator, clock, zone, useCuratorClientCache, useConfigServerLock, nodeObjectCacheSize);
+ this.db = new CuratorDatabaseClient(flavors, curator, clock, zone, useCuratorClientCache, nodeObjectCacheSize);
this.zone = zone;
this.clock = clock;
this.flavors = flavors;
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java
index 160ab86591a..7a3267604fb 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClient.java
@@ -11,6 +11,7 @@ import com.yahoo.config.provision.NodeFlavors;
import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.Zone;
import com.yahoo.path.Path;
+import com.yahoo.transaction.Mutex;
import com.yahoo.transaction.NestedTransaction;
import com.yahoo.transaction.Transaction;
import com.yahoo.vespa.curator.Curator;
@@ -77,16 +78,14 @@ public class CuratorDatabaseClient {
private final Clock clock;
private final Zone zone;
private final CuratorCounter provisionIndexCounter;
- private final boolean logStackTracesOnLockTimeout;
- public CuratorDatabaseClient(NodeFlavors flavors, Curator curator, Clock clock, Zone zone, boolean useCache, boolean logStackTracesOnLockTimeout,
+ public CuratorDatabaseClient(NodeFlavors flavors, Curator curator, Clock clock, Zone zone, boolean useCache,
long nodeObjectCacheSize) {
this.nodeSerializer = new NodeSerializer(flavors, nodeObjectCacheSize);
this.zone = zone;
this.db = new CuratorDatabase(curator, root, useCache);
this.clock = clock;
this.provisionIndexCounter = new CuratorCounter(curator, root.append("provisionIndexCounter").getAbsolute());
- this.logStackTracesOnLockTimeout = logStackTracesOnLockTimeout;
initZK();
}
@@ -392,31 +391,33 @@ public class CuratorDatabaseClient {
* transaction. The config server then commits (writes) the transaction which may include operations that modify
* data in paths owned by this class.
*/
- public Lock lock(ApplicationId application, Duration timeout) {
+ // TODO(mpolden): Simplify once we are down to one application lock
+ public Mutex lock(ApplicationId application, Duration timeout) {
+ Mutex legacyLock;
+ Mutex lock;
+ // Take the application lock (same as config server). This is likely held at this point, but is re-entrant.
try {
- return db.lock(lockPath(application), timeout);
+ lock = db.lock(lockPath(application), timeout);
} catch (UncheckedTimeoutException e) {
- if (logStackTracesOnLockTimeout) {
- log.log(Level.WARNING, "Logging stack trace from all threads due to lock timeout");
- Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces();
- for (Map.Entry<Thread, StackTraceElement[]> kv : stackTraces.entrySet()) {
- StringBuilder sb = new StringBuilder();
- sb.append("Thread '")
- .append(kv.getKey().getName())
- .append("'\n");
- for (var stackTraceElement : kv.getValue()) {
- sb.append("\tat ")
- .append(stackTraceElement)
- .append("\n");
- }
- log.log(Level.WARNING, sb.toString());
- }
- }
throw new ApplicationLockException(e);
}
+ // Take the legacy node-repository lock
+ try {
+ legacyLock = db.lock(legacyLockPath(application), timeout);
+ } catch (UncheckedTimeoutException e) {
+ lock.close();
+ throw new ApplicationLockException(e);
+ }
+ return () -> {
+ try {
+ legacyLock.close();
+ } finally {
+ lock.close();
+ }
+ };
}
- public Lock lock(ApplicationId application) {
+ public Mutex lock(ApplicationId application) {
return lock(application, defaultLockTimeout);
}
@@ -424,7 +425,7 @@ public class CuratorDatabaseClient {
public List<ApplicationId> readApplicationIds() {
return db.getChildren(applicationsPath).stream()
- .map(path -> ApplicationId.fromSerializedForm(path))
+ .map(ApplicationId::fromSerializedForm)
.collect(Collectors.toList());
}
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClientTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClientTest.java
index c7535f04c4f..b60364d903e 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClientTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/CuratorDatabaseClientTest.java
@@ -8,7 +8,6 @@ import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.TenantName;
import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.curator.Curator;
-import com.yahoo.vespa.curator.Lock;
import com.yahoo.vespa.curator.mock.MockCurator;
import com.yahoo.vespa.hosted.provision.Node;
import com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder;
@@ -26,7 +25,7 @@ public class CuratorDatabaseClientTest {
private final Curator curator = new MockCurator();
private final CuratorDatabaseClient zkClient = new CuratorDatabaseClient(
- FlavorConfigBuilder.createDummies("default"), curator, Clock.systemUTC(), Zone.defaultZone(), true, false, 1000);
+ FlavorConfigBuilder.createDummies("default"), curator, Clock.systemUTC(), Zone.defaultZone(), true, 1000);
@Test
public void can_read_stored_host_information() throws Exception {
@@ -41,22 +40,14 @@ public class CuratorDatabaseClientTest {
@Test
public void locks_can_be_acquired_and_released() {
ApplicationId app = ApplicationId.from(TenantName.from("testTenant"), ApplicationName.from("testApp"), InstanceName.from("testInstance"));
-
- try (Lock mutex1 = zkClient.lock(app)) {
- mutex1.toString(); // reference to avoid warning
+ try (var ignored = zkClient.lock(app)) {
throw new RuntimeException();
+ } catch (RuntimeException expected) {
}
- catch (RuntimeException expected) {
+ try (var ignored = zkClient.lock(app)) {
}
-
- try (Lock mutex2 = zkClient.lock(app)) {
- mutex2.toString(); // reference to avoid warning
+ try (var ignored = zkClient.lock(app)) {
}
-
- try (Lock mutex3 = zkClient.lock(app)) {
- mutex3.toString(); // reference to avoid warning
- }
-
}
}
diff --git a/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp b/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp
index ba6c3b72d1e..585a493559d 100644
--- a/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp
+++ b/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp
@@ -264,6 +264,7 @@ class BMParams {
uint32_t _update_passes;
uint32_t _remove_passes;
uint32_t _rpc_network_threads;
+ uint32_t _rpc_targets_per_node;
uint32_t _response_threads;
uint32_t _max_pending;
bool _enable_distributor;
@@ -284,6 +285,7 @@ public:
_update_passes(1),
_remove_passes(2),
_rpc_network_threads(1), // Same default as in stor-communicationmanager.def
+ _rpc_targets_per_node(1), // Same default as in stor-communicationmanager.def
_response_threads(2), // Same default as in stor-filestor.def
_max_pending(1000),
_enable_distributor(false),
@@ -305,6 +307,7 @@ public:
uint32_t get_update_passes() const { return _update_passes; }
uint32_t get_remove_passes() const { return _remove_passes; }
uint32_t get_rpc_network_threads() const { return _rpc_network_threads; }
+ uint32_t get_rpc_targets_per_node() const { return _rpc_targets_per_node; }
uint32_t get_response_threads() const { return _response_threads; }
bool get_enable_distributor() const { return _enable_distributor; }
bool get_use_document_api() const { return _use_document_api; }
@@ -319,6 +322,7 @@ public:
void set_update_passes(uint32_t update_passes_in) { _update_passes = update_passes_in; }
void set_remove_passes(uint32_t remove_passes_in) { _remove_passes = remove_passes_in; }
void set_rpc_network_threads(uint32_t threads_in) { _rpc_network_threads = threads_in; }
+ void set_rpc_targets_per_node(uint32_t targets_in) { _rpc_targets_per_node = targets_in; }
void set_response_threads(uint32_t threads_in) { _response_threads = threads_in; }
void set_enable_distributor(bool enable_distributor_in) { _enable_distributor = enable_distributor_in; }
void set_enable_service_layer(bool enable_service_layer_in) { _enable_service_layer = enable_service_layer_in; }
@@ -355,6 +359,10 @@ BMParams::check() const
std::cerr << "Too few rpc network threads: " << _rpc_network_threads << std::endl;
return false;
}
+ if (_rpc_targets_per_node < 1) {
+ std::cerr << "Too few rpc targets per node: " << _rpc_targets_per_node << std::endl;
+ return false;
+ }
if (_response_threads < 1) {
std::cerr << "Too few response threads: " << _response_threads << std::endl;
return false;
@@ -469,6 +477,7 @@ struct MyStorageConfig
make_slobroks_config(slobroks, slobrok_port);
stor_communicationmanager.useDirectStorageapiRpc = true;
stor_communicationmanager.rpc.numNetworkThreads = params.get_rpc_network_threads();
+ stor_communicationmanager.rpc.numTargetsPerNode = params.get_rpc_targets_per_node();
stor_communicationmanager.mbusport = mbus_port;
stor_communicationmanager.rpcport = rpc_port;
@@ -900,6 +909,7 @@ PersistenceProviderFixture::create_feed_handler(const BMParams& params)
StorageApiRpcService::Params rpc_params;
// This is the same compression config as the default in stor-communicationmanager.def.
rpc_params.compression_config = CompressionConfig(CompressionConfig::Type::LZ4, 3, 90, 1024);
+ rpc_params.num_rpc_targets_per_node = params.get_rpc_targets_per_node();
if (params.get_use_document_api()) {
_feed_handler = std::make_unique<DocumentApiMessageBusBmFeedHandler>(*_message_bus);
} else if (params.get_enable_distributor()) {
@@ -1284,6 +1294,7 @@ App::usage()
"[--update-passes update-passes]\n"
"[--remove-passes remove-passes]\n"
"[--rpc-network-threads threads]\n"
+ "[--rpc-targets-per-node targets]\n"
"[--response-threads threads]\n"
"[--enable-distributor]\n"
"[--enable-service-layer]\n"
@@ -1311,6 +1322,7 @@ App::get_options()
{ "remove-passes", 1, nullptr, 0 },
{ "response-threads", 1, nullptr, 0 },
{ "rpc-network-threads", 1, nullptr, 0 },
+ { "rpc-targets-per-node", 1, nullptr, 0 },
{ "use-document-api", 0, nullptr, 0 },
{ "use-legacy-bucket-db", 0, nullptr, 0 },
{ "use-message-bus", 0, nullptr, 0 },
@@ -1328,6 +1340,7 @@ App::get_options()
LONGOPT_REMOVE_PASSES,
LONGOPT_RESPONSE_THREADS,
LONGOPT_RPC_NETWORK_THREADS,
+ LONGOPT_RPC_TARGETS_PER_NODE,
LONGOPT_USE_DOCUMENT_API,
LONGOPT_USE_LEGACY_BUCKET_DB,
LONGOPT_USE_MESSAGE_BUS,
@@ -1372,6 +1385,9 @@ App::get_options()
case LONGOPT_RPC_NETWORK_THREADS:
_bm_params.set_rpc_network_threads(atoi(opt_argument));
break;
+ case LONGOPT_RPC_TARGETS_PER_NODE:
+ _bm_params.set_rpc_targets_per_node(atoi(opt_argument));
+ break;
case LONGOPT_USE_DOCUMENT_API:
_bm_params.set_use_document_api(true);
break;
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
index abcf35051fc..d25a234c6f8 100644
--- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
@@ -21,7 +21,6 @@
#include <vespa/searchcore/proton/test/attribute_vectors.h>
#include <vespa/searchlib/attribute/attribute_read_guard.h>
#include <vespa/searchlib/attribute/attributefactory.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
#include <vespa/searchlib/attribute/imported_attribute_vector_factory.h>
#include <vespa/searchlib/attribute/predicate_attribute.h>
diff --git a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp
index 34a2d139498..59c046dee46 100644
--- a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp
+++ b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp
@@ -13,6 +13,7 @@
#include <vespa/document/repo/configbuilder.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/addvalueupdate.h>
+#include <vespa/document/update/arithmeticvalueupdate.h>
#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/document/update/clearvalueupdate.h>
#include <vespa/document/update/documentupdate.h>
@@ -25,7 +26,6 @@
#include <vespa/eval/tensor/tensor.h>
#include <vespa/searchcore/proton/common/attribute_updater.h>
#include <vespa/searchlib/attribute/attributefactory.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/reference_attribute.h>
#include <vespa/searchlib/tensor/dense_tensor_attribute.h>
#include <vespa/searchlib/tensor/serialized_tensor_attribute.h>
diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp
index 0fc290c9d2c..b74ee5ac803 100644
--- a/searchcore/src/tests/proton/common/cachedselect_test.cpp
+++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp
@@ -13,8 +13,8 @@
#include <vespa/searchcore/proton/common/selectcontext.h>
#include <vespa/searchlib/attribute/attributecontext.h>
#include <vespa/searchlib/attribute/attributefactory.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/enumcomparator.h>
+#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/postinglistattribute.h>
#include <vespa/searchlib/attribute/singleenumattribute.hpp>
#include <vespa/searchlib/attribute/singlenumericenumattribute.hpp>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 28eeb541a13..e9c80b86aff 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -10,7 +10,6 @@
#include <vespa/searchcore/proton/attribute/attribute_utils.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/common/attribute_updater.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
#include <vespa/searchlib/common/idestructorcallback.h>
#include <vespa/searchlib/tensor/prepare_result.h>
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index ea71cafb73a..bca5876267b 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -8,7 +8,6 @@
#include <vespa/searchcore/proton/bucketdb/bucketsessionbase.h>
#include <vespa/searchcore/proton/bucketdb/joinbucketssession.h>
#include <vespa/searchcore/proton/bucketdb/splitbucketsession.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/load_utils.h>
#include <vespa/searchlib/attribute/readerbase.h>
#include <vespa/searchlib/common/i_gid_to_lid_mapper.h>
diff --git a/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp b/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp
index 245f082a2db..6e5e3f75b5e 100644
--- a/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp
+++ b/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp
@@ -7,7 +7,6 @@
#include <vespa/vespalib/data/fileheader.h>
#include <fstream>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/fastlib/io/bufferedfile.h>
#include <vespa/fastos/app.h>
diff --git a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
index 04d2dfe4d52..bba266ca06e 100644
--- a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
+++ b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
@@ -9,7 +9,6 @@
#include <vespa/vespalib/util/compress.h>
#include <vespa/searchlib/fef/termfieldmatchdata.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/i_document_weight_attribute.h>
#include <vespa/searchlib/queryeval/document_weight_search_iterator.h>
#include <vespa/searchlib/test/searchiteratorverifier.h>
diff --git a/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp b/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp
index 2766d310baf..dde6b14121d 100644
--- a/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp
+++ b/searchlib/src/tests/attribute/compaction/attribute_compaction_test.cpp
@@ -3,7 +3,6 @@
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributeguard.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/address_space_usage.h>
diff --git a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
index d8a1d03f1a8..224b3bd127f 100644
--- a/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
+++ b/searchlib/src/tests/attribute/document_weight_iterator/document_weight_iterator_test.cpp
@@ -6,7 +6,6 @@
#include <vespa/searchlib/attribute/attribute_read_guard.h>
#include <vespa/searchlib/attribute/attributememorysavetarget.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/attrvector.h>
#include <vespa/searchlib/attribute/i_document_weight_attribute.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
diff --git a/searchlib/src/tests/attribute/enum_attribute_compaction/enum_attribute_compaction_test.cpp b/searchlib/src/tests/attribute/enum_attribute_compaction/enum_attribute_compaction_test.cpp
index 45d432c29be..bd1b63c01d8 100644
--- a/searchlib/src/tests/attribute/enum_attribute_compaction/enum_attribute_compaction_test.cpp
+++ b/searchlib/src/tests/attribute/enum_attribute_compaction/enum_attribute_compaction_test.cpp
@@ -3,7 +3,6 @@
#include <vespa/vespalib/gtest/gtest.h>
#include <vespa/searchcommon/attribute/attributecontent.h>
#include <vespa/searchlib/attribute/attributefactory.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/searchlib/test/weighted_type_test_utils.h>
diff --git a/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp b/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp
index 2a5b8014299..e65684d0ea5 100644
--- a/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp
+++ b/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp
@@ -22,8 +22,6 @@
#include <vespa/vespalib/util/compress.h>
#include <vespa/vespalib/data/databuffer.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
-
#include <limits>
#include <iostream>
#include <cmath>
diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
index 3e849ba6c4e..46157385f44 100644
--- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
+++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
@@ -3,6 +3,7 @@
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/asciistream.h>
+#include <vespa/document/update/arithmeticvalueupdate.h>
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/postinglistattribute.h>
@@ -13,7 +14,6 @@
#include <vespa/searchlib/queryeval/executeinfo.h>
#include <vespa/searchlib/parsequery/parse.h>
#include <vespa/searchlib/attribute/enumstore.hpp>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/vespalib/util/compress.h>
#include <vespa/searchlib/fef/termfieldmatchdata.h>
#include <vespa/fastos/file.h>
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp
index ffae7824668..98cb8c0485e 100644
--- a/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp
+++ b/searchlib/src/tests/attribute/searchcontext/searchcontext_test.cpp
@@ -19,7 +19,6 @@
#include <vespa/searchlib/test/searchiteratorverifier.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/util/compress.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/log/log.h>
LOG_SETUP("searchcontext_test");
diff --git a/searchlib/src/tests/common/location_iterator/location_iterator_test.cpp b/searchlib/src/tests/common/location_iterator/location_iterator_test.cpp
index a1862b5f79e..84b81fccf7c 100644
--- a/searchlib/src/tests/common/location_iterator/location_iterator_test.cpp
+++ b/searchlib/src/tests/common/location_iterator/location_iterator_test.cpp
@@ -4,7 +4,6 @@
#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/attribute.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/attrvector.h>
#include <vespa/searchlib/attribute/iattributemanager.h>
#include <vespa/searchlib/attribute/multinumericattribute.h>
diff --git a/searchlib/src/tests/expression/attributenode/attribute_node_test.cpp b/searchlib/src/tests/expression/attributenode/attribute_node_test.cpp
index 02d459dd0d8..5592edcc514 100644
--- a/searchlib/src/tests/expression/attributenode/attribute_node_test.cpp
+++ b/searchlib/src/tests/expression/attributenode/attribute_node_test.cpp
@@ -5,7 +5,6 @@
#include <vespa/searchlib/attribute/attributecontext.h>
#include <vespa/searchlib/attribute/attributemanager.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/floatbase.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/stringbase.h>
diff --git a/searchlib/src/tests/features/beta/beta_features.cpp b/searchlib/src/tests/features/beta/beta_features.cpp
index 89a72fab6fc..7ff8adc2a33 100644
--- a/searchlib/src/tests/features/beta/beta_features.cpp
+++ b/searchlib/src/tests/features/beta/beta_features.cpp
@@ -3,7 +3,6 @@
#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/attributemanager.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/floatbase.h>
#include <vespa/searchlib/attribute/stringbase.h>
diff --git a/searchlib/src/tests/features/prod_features.cpp b/searchlib/src/tests/features/prod_features.cpp
index 4950edad635..08322b5c729 100644
--- a/searchlib/src/tests/features/prod_features.cpp
+++ b/searchlib/src/tests/features/prod_features.cpp
@@ -4,7 +4,6 @@
#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/extendableattributes.h>
#include <vespa/searchlib/attribute/floatbase.h>
#include <vespa/searchlib/attribute/integerbase.h>
diff --git a/searchlib/src/tests/fef/attributecontent/attributecontent_test.cpp b/searchlib/src/tests/fef/attributecontent/attributecontent_test.cpp
index f7565b7275b..c4884189859 100644
--- a/searchlib/src/tests/fef/attributecontent/attributecontent_test.cpp
+++ b/searchlib/src/tests/fef/attributecontent/attributecontent_test.cpp
@@ -6,8 +6,6 @@ LOG_SETUP("attributecontent_test");
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/integerbase.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
-
using namespace search::attribute;
namespace search {
diff --git a/searchlib/src/tests/queryeval/matching_elements_search/matching_elements_search_test.cpp b/searchlib/src/tests/queryeval/matching_elements_search/matching_elements_search_test.cpp
index 193ab6b1b67..5841320854a 100644
--- a/searchlib/src/tests/queryeval/matching_elements_search/matching_elements_search_test.cpp
+++ b/searchlib/src/tests/queryeval/matching_elements_search/matching_elements_search_test.cpp
@@ -3,7 +3,6 @@
#include <vespa/searchcommon/attribute/attributecontent.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/i_document_weight_attribute.h>
diff --git a/searchlib/src/tests/ranksetup/ranksetup_test.cpp b/searchlib/src/tests/ranksetup/ranksetup_test.cpp
index 0a20ddb3739..669a421d6d3 100644
--- a/searchlib/src/tests/ranksetup/ranksetup_test.cpp
+++ b/searchlib/src/tests/ranksetup/ranksetup_test.cpp
@@ -7,7 +7,7 @@
#include <vespa/searchlib/attribute/attributeguard.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
+#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/fef/blueprint.h>
#include <vespa/searchlib/fef/blueprintfactory.h>
diff --git a/searchlib/src/tests/sortspec/multilevelsort.cpp b/searchlib/src/tests/sortspec/multilevelsort.cpp
index 2c0b82555b7..06a54f462d3 100644
--- a/searchlib/src/tests/sortspec/multilevelsort.cpp
+++ b/searchlib/src/tests/sortspec/multilevelsort.cpp
@@ -6,7 +6,6 @@
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributecontext.h>
#include <vespa/searchlib/attribute/attributemanager.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/uca/ucaconverter.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/log/log.h>
diff --git a/searchlib/src/vespa/searchlib/attribute/floatbase.cpp b/searchlib/src/vespa/searchlib/attribute/floatbase.cpp
index 4ffc6e333b6..72c72a74826 100644
--- a/searchlib/src/vespa/searchlib/attribute/floatbase.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/floatbase.cpp
@@ -106,4 +106,10 @@ FloatingPointAttribute::getChangeVectorMemoryUsage() const
template class FloatingPointAttributeTemplate<float>;
template class FloatingPointAttributeTemplate<double>;
+
+template bool AttributeVector::clearDoc(FloatingPointAttribute::ChangeVector& changes, DocId doc);
+template bool AttributeVector::update(FloatingPointAttribute::ChangeVector& changes, DocId doc, const NumericChangeData<double>& v);
+template bool AttributeVector::append(FloatingPointAttribute::ChangeVector& changes, DocId doc, const NumericChangeData<double>& v, int32_t w, bool doCount);
+template bool AttributeVector::remove(FloatingPointAttribute::ChangeVector& changes, DocId doc, const NumericChangeData<double>& v, int32_t w);
+
}
diff --git a/searchlib/src/vespa/searchlib/attribute/integerbase.cpp b/searchlib/src/vespa/searchlib/attribute/integerbase.cpp
index a150b5e1699..084bb85c28c 100644
--- a/searchlib/src/vespa/searchlib/attribute/integerbase.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/integerbase.cpp
@@ -106,4 +106,9 @@ template class IntegerAttributeTemplate<int16_t>;
template class IntegerAttributeTemplate<int32_t>;
template class IntegerAttributeTemplate<int64_t>;
+template bool AttributeVector::clearDoc(IntegerAttribute::ChangeVector& changes, DocId doc);
+template bool AttributeVector::update(IntegerAttribute::ChangeVector& changes, DocId doc, const NumericChangeData<largeint_t>& v);
+template bool AttributeVector::append(IntegerAttribute::ChangeVector& changes, DocId doc, const NumericChangeData<largeint_t>& v, int32_t w, bool doCount);
+template bool AttributeVector::remove(IntegerAttribute::ChangeVector& changes, DocId doc, const NumericChangeData<largeint_t>& v, int32_t w);
+
}
diff --git a/searchlib/src/vespa/searchlib/attribute/stringbase.cpp b/searchlib/src/vespa/searchlib/attribute/stringbase.cpp
index d888ead21bf..f113b99357f 100644
--- a/searchlib/src/vespa/searchlib/attribute/stringbase.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/stringbase.cpp
@@ -415,4 +415,9 @@ StringAttribute::getChangeVectorMemoryUsage() const
return _changes.getMemoryUsage();
}
+template bool AttributeVector::clearDoc(StringAttribute::ChangeVector& changes, DocId doc);
+template bool AttributeVector::update(StringAttribute::ChangeVector& changes, DocId doc, const StringChangeData& v);
+template bool AttributeVector::append(StringAttribute::ChangeVector& changes, DocId doc, const StringChangeData& v, int32_t w, bool doCount);
+template bool AttributeVector::remove(StringAttribute::ChangeVector& changes, DocId doc, const StringChangeData& v, int32_t w);
+
}
diff --git a/searchlib/src/vespa/searchlib/fef/test/matchdatabuilder.cpp b/searchlib/src/vespa/searchlib/fef/test/matchdatabuilder.cpp
index 568ae16029c..8444d486104 100644
--- a/searchlib/src/vespa/searchlib/fef/test/matchdatabuilder.cpp
+++ b/searchlib/src/vespa/searchlib/fef/test/matchdatabuilder.cpp
@@ -2,7 +2,6 @@
#include "matchdatabuilder.h"
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/searchlib/src/vespa/searchlib/transactionlog/common.cpp b/searchlib/src/vespa/searchlib/transactionlog/common.cpp
index 3308f3182dc..8bfc13347e9 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/common.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/common.cpp
@@ -99,13 +99,6 @@ Packet::Entry::serialize(nbostream & os) const
return os;
}
-Packet::Entry::Entry(SerialNum u, Type t, const vespalib::ConstBufferRef & d) :
- _unique(u),
- _type(t),
- _valid(true),
- _data(d)
-{ }
-
void
Packet::add(const Packet::Entry & e)
{
diff --git a/searchlib/src/vespa/searchlib/transactionlog/common.h b/searchlib/src/vespa/searchlib/transactionlog/common.h
index 5d07d51cdf2..e7462b38e53 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/common.h
+++ b/searchlib/src/vespa/searchlib/transactionlog/common.h
@@ -48,7 +48,12 @@ public:
{
public:
Entry() : _unique(0), _type(0), _valid(false), _data() { }
- Entry(SerialNum u, Type t, const vespalib::ConstBufferRef & d);
+ Entry(SerialNum u, Type t, const vespalib::ConstBufferRef & d)
+ : _unique(u),
+ _type(t),
+ _valid(true),
+ _data(d)
+ { }
SerialNum serial() const { return _unique; }
Type type() const { return _type; }
bool valid() const { return _valid; }
diff --git a/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp b/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp
index bd7307d1624..b756e24a3ae 100644
--- a/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp
+++ b/searchsummary/src/vespa/searchsummary/test/mock_attribute_manager.cpp
@@ -3,7 +3,6 @@
#include "mock_attribute_manager.h"
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.h>
-#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/floatbase.h>
#include <vespa/searchlib/attribute/integerbase.h>
#include <vespa/searchlib/attribute/stringbase.h>