Skip to content

Commit c805823

Browse files
authored
[C++] Increase FTS memory quota & fix PATH bug (#79)
1 parent f26a33c commit c805823

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cxx/cxx-scripted-build-pipeline.groovy

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ stage("build") {
8383
envs.push("CB_CC=gcc")
8484
envs.push("CB_CXX=g++")
8585
}
86-
path = PATH
86+
def path = PATH
8787
if (platform == "windows") {
8888
bat("cbdep install -d deps cmake ${CMAKE_VERSION}")
8989
path = "$WORKSPACE/deps/cmake-$CMAKE_VERSION/bin;" + path
@@ -217,7 +217,7 @@ if (!SKIP_TESTS.toBoolean()) {
217217
"AUTH=cxx-sdk-${BUILD_NUMBER}@couchbase.com"
218218
]){
219219
deleteDir()
220-
def allocate_cmd = "cbdyncluster allocate --num-nodes=3 --server-version=${version} --platform ec2"
220+
def allocate_cmd = "cbdyncluster allocate --num-nodes=3 --server-version=${version}"
221221
if (USE_CE.toBoolean()) {
222222
allocate_cmd += " --use-ce"
223223
}
@@ -240,7 +240,12 @@ if (!SKIP_TESTS.toBoolean()) {
240240
add_bucket_cmd += " --storage-backend ${STORAGE_BACKEND}"
241241
}
242242
sh(add_bucket_cmd)
243-
sh("curl -sS -uAdministrator:password http://${CLUSTER.firstIP()}:8093/query/service -d'statement=CREATE PRIMARY INDEX ON default USING GSI' -d 'timeout=300s'")
243+
sh("curl -sS -u Administrator:password http://${CLUSTER.firstIP()}:8093/query/service -d 'statement=CREATE PRIMARY INDEX ON default USING GSI' -d 'timeout=300s'")
244+
if (CLUSTER.major() >= 8 || (CLUSTER.major() == 7 && CLUSTER.minor() >= 6)) {
245+
// FTS changed their throttling behaviour when creating indexes to better respect its RAM quota. It now needs more memory to create search indexes in time.
246+
// See MB-64303
247+
shWithEcho("curl -v -X POST -u Administrator:password -d 'ftsMemoryQuota=2048' http://${CLUSTER.firstIP()}:8091/pools/default")
248+
}
244249
}
245250
}
246251
timeout(unit: 'MINUTES', time: 40) {

0 commit comments

Comments
 (0)