You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To help a client application to implement "copy on write" snapshot feature, add the following lightweight server-side operations. These operations should be very efficient because they are metadata-only operations and do not have to read/copy the value on a disk.
copy/6 - copy the value and user metadata to other key(s).
Maybe we want remove rename/6 operation from brick_server? The same thing can be done by a micro-transaction: do([txn, copy(OldKey, NewKey), delete(OldKey)]) Note that the current implementation of rename/6 is not an equivalent of the micro-transaction but a simple do operation: do([copy(OldKey, NewKey), delete(OldKey)]) One good thing to keep rename/6 is that it has its own operation counter for the brick operation statistics, but it does not seem to be a must-have feature.
The text was updated successfully, but these errors were encountered:
To help a client application to implement "copy on write" snapshot feature, add the following lightweight server-side operations. These operations should be very efficient because they are metadata-only operations and do not have to read/copy the value on a disk.
copy/6
- copy the value and user metadata to other key(s).copy(table(), From::key(), To::key(), exp_time(), [do_op_flag()], timeout())
copy(table(), From::key(), To::[key()], exp_time(), [do_op_flag()], timeout())
Limitation:
From::key()
andTo:key()
must have the same key prefix (they must be stored in the same chain.)Design Notes:
?KEY_SWITCHAROO
to copy only the pointer to the value.?KEY_SWITCHAROO
. Instead, do a disk-based operation; load the value of From key from an hlog on a disk and put the value to To key(s). More details on [Hibari release candidate] bad sequence file 'enoent' on a common log file deleted by the scavenger hibari#33 (comment)rename/6
operation from brick_server? The same thing can be done by a micro-transaction:do([txn, copy(OldKey, NewKey), delete(OldKey)])
Note that the current implementation ofrename/6
is not an equivalent of the micro-transaction but a simple do operation:do([copy(OldKey, NewKey), delete(OldKey)])
One good thing to keeprename/6
is that it has its own operation counter for the brick operation statistics, but it does not seem to be a must-have feature.The text was updated successfully, but these errors were encountered: