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 if you modify the ram_payer of a table row, the secondary indices of that table will not update unless the data related to the index changes. This prevents changing the owner of all the data related to that row unless:
The row is erased and then recreated.
One of the fields related to the index is changed.
I assume the first solution isn't ideal because erasing and recreating the row will be a heavier operation than a modification.
The second solution doesn't work unless you actually need to change the data related to all the indices. If you don't need to change the data, then you're forced to make 2x modify calls - one to the data to a temporary value and then one to change it back.
We opt'd currently to go for the second solution, for the sake of performance and less code to implement:
aaroncox
changed the title
Add ability to change the ram_payer of a secondary indices
Add ability to change the ram_payer of secondary indices
Feb 5, 2024
Related conversation from Antelope Developers chat in Telegram.
https://t.me/antelopedevs/339008
Currently if you modify the
ram_payer
of a table row, the secondary indices of that table will not update unless the data related to the index changes. This prevents changing the owner of all the data related to that row unless:I assume the first solution isn't ideal because erasing and recreating the row will be a heavier operation than a modification.
The second solution doesn't work unless you actually need to change the data related to all the indices. If you don't need to change the data, then you're forced to make 2x modify calls - one to the data to a temporary value and then one to change it back.
We opt'd currently to go for the second solution, for the sake of performance and less code to implement:
https://github.com/drops-system/drops/pull/27/files
What I'd expect is that if the
ram_payer
changes for the row, all the secondary indices related to that row also change.If that's not possible, then exposing a function to modify the
ram_payer
of one or more indices would also work.The text was updated successfully, but these errors were encountered: