Request object
The Staging database is a global database shared between threads. To avoid locking issues, a queue based producer-consumer model is built. In this model, the staging database is controlled by a thread and reads requests from a queue.
Each request has a callback that is called when the request is finished. The thread is an operating system thread and not a Cloverleaf engine thread.
This table shows the request object fields:
Field | Name | C++ type | Notes | |
---|---|---|---|---|
1 | RequestType
|
reqtype | integer | One of:
|
2 | Key
Space
|
keyspace | string | |
3 | Key
|
key | string | |
4 | Data
|
data | string | |
5 | Metadata
|
metadata | string | |
6 | Value Type
|
datatype | integer | DTC for (key,value) DTC protocol writes:
|
7 | Return Value
|
ret | integer |
STAGE_ERR_SUCCESS(0)
If success, other values mean failure. |