Skip to content

Commit

Permalink
HPCC-31181 Code Review 2
Browse files Browse the repository at this point in the history
- Reverting suggested use of changeMode from read to write

Signed-off-by: Rodrigo Pastrana <[email protected]>
  • Loading branch information
rpastrana committed Feb 5, 2024
1 parent 8b2d707 commit 6cb673c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions esp/services/ws_store/espstorelib/daliKVStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ bool CDALIKVStore::createStore(const char * apptype, const char * storename, con
}
}

//target store does not exist, let's create it
//re-establish connection with write lock
conn.clear();
conn.setown(querySDS().connect(DALI_KVSTORE_PATH, myProcessSession(), RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT_KVSTORE));

Owned<IPropertyTree> apptree = createPTree();
apptree->setProp(DALI_KVSTORE_NAME_ATT, storename);
CDateTime dt;
Expand All @@ -58,8 +63,6 @@ bool CDALIKVStore::createStore(const char * apptype, const char * storename, con
if (maxvalsize != 0)
apptree->setPropInt(DALI_KVSTORE_MAXVALSIZE_ATT, maxvalsize);

conn->changeMode(RTM_LOCK_WRITE, SDS_LOCK_TIMEOUT_KVSTORE);

Owned<IPropertyTree> root = conn->getRoot();
if (root->hasProp(xpath.str()))
{
Expand Down

0 comments on commit 6cb673c

Please sign in to comment.