Skip to content

Commit

Permalink
Update 82-code-structure.md
Browse files Browse the repository at this point in the history
  • Loading branch information
badrishc committed Mar 1, 2022
1 parent 63e6679 commit 8d46195
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/_docs/82-code-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,20 @@ classes: wide
---

Check out https://github.com/microsoft/FASTER. More details will be added in future.

## Lifecycle of a Read operation for disk data

Here is the sequence of steps from FASTER side, during a Read operation for disk data:
1. User issues `Read` operation
2. We create a `PendingContext` object for the read
3. The `HandleOperationStatus()` call adds `PendingContext` object to `ioPendingRequests` dictionary
4. Create `AsyncIOContext` which has pointer to a `readyResponses` queue (also called `callbackQueue`), for that session
5. Issue IO with `AsyncIOContext` as param
6. …
7. IO callback accesses `readyResponses`queue, and enqueues the result in there (result is just the `AsyncIOContext` itself)
8. …
9. User calls `CompletePending` on session, which does this:
* Dequeue entry from `readyResponses` queue
* Remove item from `ioPendingRequests` dictionary
* Finally return result to user via `ReadCompletionCallback`

0 comments on commit 8d46195

Please sign in to comment.