Skip to content

Commit

Permalink
fix daos returns const FieldLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
danovaro committed Sep 18, 2024
1 parent 3bd3d0b commit 7f8e64c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/fdb5/daos/DaosStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ eckit::DataHandle* DaosStore::retrieve(Field& field) const {

}

std::unique_ptr<FieldLocation> DaosStore::archive(const Key &key, const void *data, eckit::Length length) {
std::unique_ptr<const FieldLocation> DaosStore::archive(const Key &key, const void *data, eckit::Length length) {

/// @note: performed RPCs:
/// - open pool if not cached (daos_pool_connect) -- always skipped as it is cached after selectDatabase.
Expand Down
6 changes: 3 additions & 3 deletions tests/fdb/daos/test_daos_catalogue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ CASE("DaosCatalogue tests") {
// archive

/// DaosManager is configured with client config from the file
std::unique_ptr<fdb5::FieldLocation> loc(new fdb5::DaosFieldLocation(
std::unique_ptr<const fdb5::FieldLocation> loc(new fdb5::DaosFieldLocation(
eckit::URI{"daos", "test_uri"}, eckit::Offset(0), eckit::Length(1), fdb5::Key(nullptr, true)
));

Expand Down Expand Up @@ -308,7 +308,7 @@ CASE("DaosCatalogue tests") {

fdb5::DaosStore dstore{schema, db_key, config};
fdb5::Store& store = static_cast<fdb5::Store&>(dstore);
std::unique_ptr<fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
std::unique_ptr<const fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
/// @todo: there are two cont create with label here
/// @todo: again, daos_fini happening before cont and pool close

Expand Down Expand Up @@ -399,7 +399,7 @@ CASE("DaosCatalogue tests") {

fdb5::TocStore tstore{schema, db_key, config};
fdb5::Store& store = static_cast<fdb5::Store&>(tstore);
std::unique_ptr<fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
std::unique_ptr<const fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
/// @todo: there are two cont create with label here
/// @todo: again, daos_fini happening before cont and pool close

Expand Down
4 changes: 2 additions & 2 deletions tests/fdb/daos/test_daos_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ CASE("DaosStore tests") {
/// DaosManager is configured with client config from the file
fdb5::DaosStore dstore{schema, db_key, config};
fdb5::Store& store = dstore;
std::unique_ptr<fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
std::unique_ptr<const fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
/// @todo: two cont create with label happen here
/// @todo: again, daos_fini happening before cont and pool close

Expand Down Expand Up @@ -257,7 +257,7 @@ CASE("DaosStore tests") {

fdb5::DaosStore dstore{schema, db_key, config};
fdb5::Store& store = static_cast<fdb5::Store&>(dstore);
std::unique_ptr<fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
std::unique_ptr<const fdb5::FieldLocation> loc(store.archive(index_key, data, sizeof(data)));
/// @todo: there are two cont create with label here
/// @todo: again, daos_fini happening before cont and pool close

Expand Down

0 comments on commit 7f8e64c

Please sign in to comment.