Begin implementation of the STABLE operation

This commit is contained in:
Vitaliy Filippov
2019-11-10 14:37:45 +03:00
parent 7aabe11ef9
commit 890335bff6
4 changed files with 65 additions and 3 deletions
+6
View File
@@ -162,6 +162,8 @@ public:
// to calculate parity for subsequent writes
// - Writes may be submitted in any order, because they don't overlap. Each write
// goes into a new location - either on the journal device or on the data device
// - Stable (stabilize) must be submitted after sync of that object is completed
// It's even OK to return an error to the caller if that object is not synced yet
// - Journal trim may be processed only after all versions are moved to
// the main storage AND after all read operations for older versions complete
// - If an operation can not be submitted because the ring is full
@@ -286,6 +288,10 @@ class blockstore
int continue_sync(blockstore_operation *op);
int ack_sync(blockstore_operation *op);
// Stable
int dequeue_stable(blockstore_operation *op);
void handle_stable_event(ring_data_t *data, blockstore_operation *op);
public:
blockstore(spp::sparse_hash_map<std::string, std::string> & config, ring_loop_t *ringloop);