@@ -21,7 +21,9 @@ using metkit::mars::MarsRequest;
21
21
namespace fdb5 ::remote {
22
22
23
23
StoreHandler::StoreHandler (eckit::net::TCPSocket& socket, const Config& config):
24
- ServerConnection (socket, config) {}
24
+ ServerConnection (socket, config) {
25
+ LibFdb5::instance ().constructorCallback ()(*this );
26
+ }
25
27
26
28
StoreHandler::~StoreHandler () {}
27
29
@@ -174,8 +176,11 @@ void StoreHandler::archiveBlob(const uint32_t clientID, const uint32_t requestID
174
176
std::promise<std::shared_ptr<const FieldLocation>> promise;
175
177
promise.set_value (location);
176
178
177
- Key fullkey = Key::parseString (ss_key.str ());
178
- archiveCallback_ (fullkey, data, length, promise.get_future ());
179
+ eckit::StringDict dict = dbKey.keyDict ();
180
+ dict.insert (idxKey.keyDict ().begin (), idxKey.keyDict ().end ());
181
+ const Key fullkey (dict); // / @note: we do not have the third level of the key.
182
+
183
+ archiveCallback_ (fullkey, charData + s.position (), length - s.position (), promise.get_future ());
179
184
180
185
Log::status () << " Archiving done: " << ss_key.str () << std::endl;
181
186
@@ -203,6 +208,8 @@ void StoreHandler::flush(uint32_t clientID, uint32_t requestID, const eckit::Buf
203
208
auto it = stores_.find (clientID);
204
209
ASSERT (it != stores_.end ());
205
210
it->second .store ->flush ();
211
+
212
+ flushCallback_ ();
206
213
}
207
214
208
215
Log::info () << " Flush complete" << std::endl;
0 commit comments