Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 关于RaftCmdRequest中有多个request的情况
|
username: T0V1P_萝卜头
- When there are multiple requests, do we need to ensure all or none? (Because some keys might be within the region, and some might not)
- Should subsequent writes be able to see previous reads?
For example, if a RaftCmdRequest contains write(k1, v1) get(k1) snap() write(k2, v2), should the return value of get(k1) be v1? Or are these requests considered concurrent? (If subsequent writes need to see previous reads, does it mean that this snap() must return a strange intermediate state: able to see k1 but not k2) - Is there a specific rule for packaging requests into an entry? For example, ensuring a batch is either all writes or all reads?