I am confused to understand what is read and write set in fabric 1.0, Kindly someone explain by taking example if possible.
Read set and write sets are related to a transaction.
Suppose you have a transaction, read key a1 (suppose a1's value = value_a1, version = version_a1), and key a2(suppose a2's value = value_a2, version = version_a2), suppose we want a1's value to be decremented, and a2's value incremented;
So this transaction's read set is :
{a1, value_a1, version_a1; a2, value_a2, version_a2};
i.e., the related key, its value, its version list;
This transaction's write set is:
{a1, (value_a1 -1); a2, (value_a2 +1)};
i.e., the updated key and its new value list.
Read set and write set are used for transaction endorsement and commit (update world state) at committer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With