THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- The locks in metadata transaction a to c makes make sure that read-only queries are allowed for the most time except the duration of metadata transaction b.
- We make sure step 5 and 6 can sustain InterruptedException, which means we will keep retrying metadata transaction 5 and 6 until success, in the event of interrupted exceptions.
- The locks in metadata transaction a to c makes make sure that read-only queries are allowed for the most time except the duration of metadata transaction b.
- Concurrency:
Since we cut the rebalance process into three metadata transactions, other metadata write operations could potentially interleave with the rebalance process.- CASE 1: if foo is dropped between metadata transaction a and b. At the beginning of step 5, we check the existence of foo and drop target files if foo is dropped between transaction a and b.
- CASE 2: if foo is dropped between metadata transaction b and c. This time, it's the rebalance target that gets dropped. Therefore, step 6 is independent to the drop operation.
- Idempotent property:
...