Code Structure
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:
- User issues
Read
operation - We create a
PendingContext
object for the read - The
HandleOperationStatus()
call addsPendingContext
object toioPendingRequests
dictionary - Create
AsyncIOContext
which has pointer to areadyResponses
queue (also calledcallbackQueue
), for that session - Issue IO with
AsyncIOContext
as param - …
- IO callback accesses
readyResponses
queue, and enqueues the result in there (result is just theAsyncIOContext
itself) - …
- 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
- Dequeue entry from