mirror of
https://github.com/wassname/ray.git
synced 2026-08-16 11:27:09 +08:00
End-to-end object size information passthrough (#105)
* rebase Alexey's PR on top * rebase on master * fix test failure waiting for plasma manager to exit * clang format * addressing comments * Minor formatting and naming fixes.
This commit is contained in:
committed by
Robert Nishihara
parent
61904c4c3e
commit
0abbf5a113
@@ -49,6 +49,7 @@ typedef void (*object_table_done_callback)(object_id object_id,
|
||||
*
|
||||
* @param db_handle Handle to db.
|
||||
* @param object_id Object unique identifier.
|
||||
* @param data_size Object data size.
|
||||
* @param retry Information about retrying the request to the database.
|
||||
* @param done_callback Callback to be called when lookup completes.
|
||||
* @param user_context User context to be passed in the callbacks.
|
||||
@@ -56,6 +57,7 @@ typedef void (*object_table_done_callback)(object_id object_id,
|
||||
*/
|
||||
void object_table_add(db_handle *db_handle,
|
||||
object_id object_id,
|
||||
int64_t data_size,
|
||||
unsigned char digest[],
|
||||
retry_info *retry,
|
||||
object_table_done_callback done_callback,
|
||||
@@ -125,6 +127,45 @@ typedef struct {
|
||||
void *subscribe_context;
|
||||
} object_table_subscribe_data;
|
||||
|
||||
/*
|
||||
* ==== Object info table, contains size of the object ====
|
||||
*/
|
||||
|
||||
typedef void (*object_info_done_callback)(object_id object_id,
|
||||
void *user_context);
|
||||
|
||||
typedef void (*object_info_subscribe_callback)(object_id object_id,
|
||||
int64_t object_size,
|
||||
void *user_context);
|
||||
|
||||
/**
|
||||
* Subcribing to the object info pub/sub channel
|
||||
*
|
||||
* @param db_handle Handle to db.
|
||||
* @param object_info_subscribe_callback callback triggered when pub/sub channel
|
||||
* is notified of a new object size.
|
||||
* @param subscribe_context caller context which will be passed back in the
|
||||
* object_info_subscribe_callback.
|
||||
* @param retry Information about retrying the request to the database.
|
||||
* @param done_callback Callback to be called when subscription is installed.
|
||||
* @param user_context User context to be passed into the done and fail
|
||||
* callbacks.
|
||||
* @return Void.
|
||||
*/
|
||||
void object_info_subscribe(db_handle *db_handle,
|
||||
object_info_subscribe_callback subscribe_callback,
|
||||
void *subscribe_context,
|
||||
retry_info *retry,
|
||||
object_info_done_callback done_callback,
|
||||
void *user_context);
|
||||
|
||||
/* Data that is needed to register new object info callbacks with the state
|
||||
* database. */
|
||||
typedef struct {
|
||||
object_info_subscribe_callback subscribe_callback;
|
||||
void *subscribe_context;
|
||||
} object_info_subscribe_data;
|
||||
|
||||
/*
|
||||
* ==== Result table ====
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user