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

sector builder should colocate pieces with similar time constraints #32

@laser

Description

@laser

Description

The add_piece FFI call has a parameter called store_until_utc_secs. The intent of this parameter is to let the caller specify the time at which the receiver can clean up (delete) the piece which they've added. As of 8/13, this parameter is ignored by the sector builder. We should add basic support for the store_until_utc_secs value.

Acceptance criteria

When accepting a piece through the FFI, the sector builder should look at its staged sectors to see which could contain the piece. If there is more than one staged sector which could contain the piece, the sector builder should write the piece to the staged sector whose average store_until_utc_secs (for all pieces in the staged sector) is closest (on the number line) to the inbound piece's store_until_utc_secs value. In the event of a tie, write the piece to the staged sector with the smallest sector id.

Notes

While this is not an awesome (or even good) packing strategy, it will allow us to exercise fully the API which the sector builder exposes to FFI consumers, and will introduce the notion of temporality to the sector packing code.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions