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
Currently, we store refs to slices in the worksheet_values table as [:max_rank:slice_id. Since we always add a row if a value is dirty, we "duplicate" rows with same max_rank on deletes.
For instance, here is an example of three consecutive changes: 1. add an element, 2. add a second element, and 3. delete both elements. The resulting worksheet_values table looks as so:
ws_test=# select from_version, to_version,value from worksheet_values where index = 42;
from_version | to_version | value
--------------+------------+-------------------------------------------
1 | 1 | [:89:ba50ec84-4444-4325-a372-d8c430429fa6
2 | 2 | [:90:ba50ec84-4444-4325-a372-d8c430429fa6
3 | 2147483647 | [:90:ba50ec84-4444-4325-a372-d8c430429fa6
(3 rows)
For the 3rd change, we need to update the worksheets table's version column (for concurrency control), as well as update the worksheet_slice_elements to change the to_version of the deleted elements, but we do not need to add a row in the worksheet_values table.
The text was updated successfully, but these errors were encountered:
Currently, we store refs to slices in the
worksheet_values
table as[:max_rank:slice_id
. Since we always add a row if a value is dirty, we "duplicate" rows with samemax_rank
on deletes.For instance, here is an example of three consecutive changes: 1. add an element, 2. add a second element, and 3. delete both elements. The resulting
worksheet_values
table looks as so:For the 3rd change, we need to update the
worksheets
table'sversion
column (for concurrency control), as well as update theworksheet_slice_elements
to change theto_version
of the deleted elements, but we do not need to add a row in theworksheet_values
table.The text was updated successfully, but these errors were encountered: