Skip to content

Migrate indexing::LFS to task system, rather than ringbuffer#7955

Open
eddyashton wants to merge 3 commits into
microsoft:mainfrom
eddyashton:lfs_tasks
Open

Migrate indexing::LFS to task system, rather than ringbuffer#7955
eddyashton wants to merge 3 commits into
microsoft:mainfrom
eddyashton:lfs_tasks

Conversation

@eddyashton

Copy link
Copy Markdown
Member

I could have sworn I opened this yesterday? But apparently not.

Copilot AI review requested due to automatic review settings June 18, 2026 15:59
@eddyashton eddyashton requested a review from a team as a code owner June 18, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the indexing LFS (large-file cache) path away from ringbuffer-based host messaging and onto the task system, so LFS store/fetch operations are scheduled as ordered tasks rather than sent to a host-side handler.

Changes:

  • Replace ringbuffer messaging for LFS with an OrderedTasks queue backed by a JobBoard, and perform disk I/O from EnclaveLFSAccess.
  • Update indexing tests to drive LFS I/O by draining a JobBoard (synchronously in lfs.cpp, via a flusher thread in indexing.cpp).
  • Remove the obsolete ringbuffer message types and host-side LFSFileHandler plumbing.

Custom instructions used:

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/indexing/test/lfs.cpp Switches LFS test plumbing from ringbuffers to draining a JobBoard.
src/indexing/test/indexing.cpp Replaces ringbuffer flushing thread with a JobBoard task-draining thread for LFS.
src/indexing/lfs_ringbuffer_types.h Removes LFS ringbuffer message definitions (no longer used).
src/indexing/enclave_lfs_access.h Implements LFS store/fetch via ordered tasks and direct file I/O under .index.
src/host/run.cpp Removes registration of the host-side LFS ringbuffer message handler.
src/host/lfs_file_handler.h Removes the host-side LFS file handler implementation.
src/enclave/enclave.h Instantiates EnclaveLFSAccess on the main job board and removes ringbuffer handler registration.

Comment on lines +155 to +165
asynchost::TimeBoundLogger log_if_slow(
fmt::format("Reading LFS file - ifstream({})", target_path.string()));
std::ifstream f(target_path, std::ios::binary);
f.seekg(0, std::ios::end);
const auto file_size = f.tellg();
f.seekg(0, std::ios::beg);
LFSEncryptedContents blob(static_cast<size_t>(file_size));
f.read(
reinterpret_cast<char*>(blob.data()),
static_cast<std::streamsize>(blob.size()));
return blob;
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.

2 participants