Skip to content

Commit dfa687d

Browse files
committed
Merge branch 'hotfix/5.18.3' into develop
2 parents 156dd71 + 3b63678 commit dfa687d

File tree

10 files changed

+102
-3
lines changed

10 files changed

+102
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.18.2
1+
5.18.3

src/fdb5/remote/server/CatalogueHandler.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ void CatalogueHandler::archiveBlob(const uint32_t clientID, const uint32_t reque
437437
}
438438
}
439439

440-
it->second.catalogue->selectIndex(idxKey);
440+
if (!it->second.catalogue->selectIndex(idxKey)) {
441+
it->second.catalogue->createIndex(idxKey, datumKey.keys().size());
442+
}
441443
it->second.catalogue->archive(idxKey, datumKey, std::move(location));
442444
{
443445
std::lock_guard<std::mutex> lock(fieldLocationsMutex_);

tests/regressions/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ if (HAVE_FDB_BUILD_TOOLS) # test scripts use the fdb tools
3333

3434
if (HAVE_GRIB)
3535
add_subdirectory(FDB-258)
36-
add_subdirectory(FDB-491)
36+
# add_subdirectory(FDB-491)
37+
add_subdirectory(FDB-595)
3738
endif()
3839

3940
endif()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Run remote API tests, but with the singleConnection option set in the server configs
2+
3+
ecbuild_configure_file( FDB-595.sh.in FDB-595.sh @ONLY )
4+
5+
ecbuild_add_test(
6+
TYPE SCRIPT
7+
COMMAND FDB-595.sh
8+
ENVIRONMENT "${test_environment}" )
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env bash
2+
3+
set -eux
4+
5+
fdbwrite="$<TARGET_FILE:fdb-write>"
6+
fdblist="$<TARGET_FILE:fdb-list>"
7+
fdbserver="$<TARGET_FILE:fdb-server>"
8+
9+
srcdir=@CMAKE_CURRENT_SOURCE_DIR@
10+
bindir=@CMAKE_CURRENT_BINARY_DIR@
11+
12+
export FDB_HOME=$bindir
13+
14+
export FDB_DEBUG=0
15+
export ECKIT_DEBUG=0
16+
17+
rm -f out.*
18+
rm -rf ${bindir}/catalogue_root
19+
rm -rf ${bindir}/store_root
20+
mkdir -p ${bindir}/catalogue_root
21+
mkdir -p ${bindir}/store_root
22+
23+
for f in catalogue.yaml store.yaml client.yaml levtypes.grib
24+
do
25+
cp $srcdir/$f $bindir
26+
done
27+
28+
cp $srcdir/schema $bindir
29+
30+
export FDB_HOME=$bindir
31+
32+
FDB5_CONFIG_FILE=$bindir/catalogue.yaml $fdbserver &
33+
catal_pid=$!
34+
35+
FDB5_CONFIG_FILE=$bindir/store.yaml $fdbserver &
36+
store_pid=$!
37+
38+
export FDB5_CONFIG_FILE=$bindir/client.yaml
39+
$fdbwrite levtypes.grib
40+
41+
cat > list <<EOF
42+
{class=od,expver=0001,stream=oper,date=20251125,time=0000,domain=g}{type=fc,levtype=sfc}{step=0,param=167}
43+
{class=od,expver=0001,stream=oper,date=20251125,time=0000,domain=g}{type=fc,levtype=pl}{step=0,levelist=1000,param=130}
44+
EOF
45+
46+
$fdblist --all --minimum-keys="" --porcelain | tee out
47+
48+
kill -9 $catal_pid
49+
kill -9 $store_pid
50+
51+
cmp out list
52+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
type: catalogue
3+
supportedConnections: [1]
4+
serverPort: 11000
5+
stores:
6+
- default: "localhost:11001"
7+
schema: ~fdb/schema
8+
spaces:
9+
- handler: Default
10+
roots:
11+
- path: ./catalogue_root
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: remote
3+
store: remote
4+
engine: remote
5+
host: localhost
6+
port: 11000
3.05 KB
Binary file not shown.

tests/regressions/FDB-595/schema

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
param: Param;
2+
step: Step;
3+
date: Date;
4+
levelist: Double;
5+
expver: Expver;
6+
time: Time;
7+
8+
[ class, expver, stream=oper, date, time, domain?
9+
[ type, levtype
10+
[ step, levelist?, param ]]
11+
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: store
3+
supportedConnections: [1]
4+
serverPort: 11001
5+
spaces:
6+
- handler: Default
7+
roots:
8+
- path: ./store_root

0 commit comments

Comments
 (0)