Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

harmony storage #11647

Merged
merged 8 commits into from
Feb 27, 2024
Merged

harmony storage #11647

merged 8 commits into from
Feb 27, 2024

Conversation

snadrus
Copy link
Collaborator

@snadrus snadrus commented Feb 22, 2024

Related Issues

This enables HarmonyTask tasks to express (kind-of-cleanly) the storage needs, the system to atomically reserve each need, and provide the paths to Do() without any API change to existing tasks.

Proposed Changes

  • Storage is an interface-like struct on TaskTypeDetails that's used to ensure tasks have what they need
  • Storagemgr, A helper, manages locking and naming.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@snadrus snadrus requested a review from a team as a code owner February 22, 2024 23:56
lib/harmony/resources/storagemgr/storagemgt.go Outdated Show resolved Hide resolved
lib/harmony/resources/storagemgr/storagemgt.go Outdated Show resolved Hide resolved
lib/harmony/resources/storagemgr/storagemgt.go Outdated Show resolved Hide resolved
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Some comments, but this looks much closer.


// This allows some other system to consider the task done.
// It's up to the caller to remove the data, if that applies.
MarkComplete() error
Copy link
Contributor

Choose a reason for hiding this comment

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

MarkComplete should also have the taskID param

lib/harmony/resources/resources.go Outdated Show resolved Hide resolved
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

With the last commit this is sufficient to implement storage reservation mechanism for tasks in the sealing pipeline; I'll open a PR on top of this one with impl ported from my previous PR with the better harmony integration

@Stebalien Stebalien merged commit d3ca54d into master Feb 27, 2024
88 checks passed
@Stebalien Stebalien deleted the feat/harmonystorage branch February 27, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants