Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-33646: Dir Conf store is not in sync when used from different t…#867

Merged
tanujashinde0405 merged 2 commits into
mainfrom
CORTX-33646
Aug 4, 2022
Merged

CORTX-33646: Dir Conf store is not in sync when used from different t…#867
tanujashinde0405 merged 2 commits into
mainfrom
CORTX-33646

Conversation

@tanujashinde0405
Copy link
Copy Markdown

@tanujashinde0405 tanujashinde0405 commented Aug 4, 2022

…hreads.

Signed-off-by: Tanuja Shinde tanuja.shinde@seagate.com

Problem Statement

  • Dir Conf store is not in sync when used from different threads.

Design

Added DirKvPayload class in kvstore for Dir Conf store operations.
tested PR with Dir conf store as below and for different threads , data is in sync now:
`>>> from cortx.utils.conf_store import Conf

Conf.load('m1', "dir:///tmp/cortx")
Conf.load('m2', "dir:///tmp/cortx")
Conf.set('m1', 'key1', 'val1')
Conf.save('m1')
Conf.get('m1', 'key1')
'val1'
Conf.get_keys('m1')
['key1']
Conf.get_keys('m2')
['key1']
`

Ran tests:
`[root@ssc-vm-g4-rhev4-1881 conf_store]# ./test_conf_store_dir.py
dir:///tmp/tmptt5e3u1x
....

Ran 4 tests in 0.143s

OK
`

Coding

  • Coding conventions are followed and code is consistent [Y/N]:
  • Confirm All CODACY errors are resolved [Y/N]:

Testing

  • Are test cases updated along with code changes due to Enhancements/Bugs [Y/N]:
  • Confirm that new test cases are added to regression and sanity plan files and relevant feature plan files [Y/N]:
  • Confirm that Test Cases are added for new features added [Y/N]:
  • Confirm Test Cases cover Happy Path, Non-Happy Path and Scalability [Y/N]:
  • Confirm Testing was performed with installed RPM/K8s deployment [Y/N]:

Review Checklist

Before posting the PR please ensure:

  • PR is self reviewed
  • Is there a change in filename/package/module or signature [Y/N]:
  • If yes for above point, Is a notification sent to all other cortx components [Y/N]
  • New package/s added to setup.py?
  • Jira is updated
  • Check if the description is clear and explained.
  • Check Acceptance Criterion is defined.
  • All the tests performed should be mentioned before Resolving a JIRA.
  • Verification needs to be done before marked as Closed/Verified.

KVstore/Confstore feature (changes/fixes) checklist

Confirm changes are made for:

  • ConfStore
  • KVStore
  • ConfCli
  • Test cases added for all above 3
  • changes done in all the KVpayloads (ConsulKvPayload, IniKvPayload, KvPayload)

Documentation

  • Changes done to WIKI / Confluence page

Comment thread py-utils/src/utils/kv_store/kv_store_collection.py
…hreads.

Signed-off-by: Tanuja Shinde <tanuja.shinde@seagate.com>
Copy link
Copy Markdown
Contributor

@lakshita-jain lakshita-jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tanujashinde0405 tanujashinde0405 merged commit bccd313 into main Aug 4, 2022
@tanujashinde0405 tanujashinde0405 deleted the CORTX-33646 branch August 4, 2022 09:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants