Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Modify replica struct to better describe deal spanning #153

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

gammazero
Copy link
Collaborator

This PR changes a replica to be composed of a slice of pieces, each with a different status, verification time, etc. as per #65.

Fixes #65

This PR changes a replica to be composed of a slice of pieces, each with a different status, verification time, etc. as per #65.

Fixes #65
@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2023

Codecov Report

Merging #153 (296a762) into main (f0e5388) will decrease coverage by 0.89%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #153      +/-   ##
==========================================
- Coverage   31.70%   30.82%   -0.89%     
==========================================
  Files           5        5              
  Lines         738      743       +5     
==========================================
- Hits          234      229       -5     
- Misses        469      479      +10     
  Partials       35       35              
Files Coverage Δ
blob/blob.go 37.50% <ø> (ø)
integration/singularity/store.go 35.28% <0.00%> (-1.49%) ⬇️

Copy link
Member

@masih masih left a comment

Choose a reason for hiding this comment

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

LGTM, we also need to update the HTTP api spec.

@gammazero gammazero requested a review from masih October 11, 2023 20:06
api/model.go Outdated
ID string `json:"id"`
Replicas []Replica `json:"Replicas,omitempty"`
ID string `json:"id"`
Replica *Replica `json:"Replicas,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

🤔 this should continue to be a slice right? A blob may have multiple replicas.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That seems correct. I was a bit confused by the relationship between deals and pieces. I think something needs to change here

Does each deal map to a separate replica, or a separate piece, or either? So if a blob is spread across multiple pieces, are those pieces in separate deals? If so, then I need to know how to determine if separate deals from getFileDealsRes are for different replicas or for different pieces in the same replica.

Copy link
Member

Choose a reason for hiding this comment

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

something needs to change here

Right, the work here is to set up stepping stones for further changes across the workflow.

Does each deal map to a separate replica, or a separate piece, or either?

Mapping of replica:deal:piece is 1:1:1 for blobs that fit within a sector (32GiB currently). But as soon as blobs become larger, then the mapping of replica to deal looks something like this 1:1..*, and mapping of deal to piece (for the time being) continues to be 1:1.

Cc @xinaxu We should think about large blob support and mapping of Singularity primitives to Motion as part of work items beyond Beta.

@masih masih requested a review from xinaxu October 12, 2023 10:53
@gammazero gammazero merged commit 93b3e13 into main Oct 12, 2023
7 checks passed
@gammazero gammazero deleted the modify-replica-struct branch October 12, 2023 14:47
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.

Replica Struct When Blob Spans Multiple Deals
3 participants