Skip to content

Conversation

@gpauloski
Copy link
Contributor

Description

Adds DAOS support via the DAOSConnector.

Fixes N/A

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

Added a mock pydaos implementation and run unit tests against that. Also executed this example script on Sunspot with a DAOS pool.

from proxystore_ex.connectors.daos import DAOSConnector

POOL = ...

with DAOSConnector(
    pool=POOL,
    container='jgpaul-test',
    namespace='proxystore',
) as connector:
    key = connector.put(b'data')
    assert connector.exists(key)
    assert connector.get(key) == b'data'

    connector.evict(key)
    assert not connector.exists(key)

print('Part 1 completed!')

connector1 = DAOSConnector(
    pool=POOL,
    container='jgpaul-test',
    namespace='proxystore',
)
connector2 = DAOSConnector.from_config(connector1.config())

key = connector1.put(b'data')
assert connector2.get(key) == b'data'
connector1.evict(key)

keys = connector1.put_batch([b'data1', b'data2', b'data3'])
values = connector1.get_batch(keys)

assert len(values) == len(keys)
assert all(v is not None for v in values)

for key in keys:
    connector1.evict(key)

connector1.close()
connector2.close()

print('Part 2 completed!')

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., black, mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

@gpauloski gpauloski added the enhancement New feature or request label Nov 14, 2023
@gpauloski gpauloski merged commit 67cfca4 into main Nov 14, 2023
@gpauloski gpauloski deleted the pydaos branch November 14, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants