diff options
author | Ravishankar N <ravishankar@redhat.com> | 2018-09-23 16:59:58 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-12-12 14:26:42 +0000 |
commit | d7a4d256bd86aadcd60668ee37079514dfcf41f3 (patch) | |
tree | 607ecda82423824e3627b841d7edb812fbf890b4 /tests | |
parent | cc0da4931533d21dbc3b9478984e24a7056dc835 (diff) |
afr: thin-arbiter 2 domain locking and in-memory state
2 domain locking + xattrop for write-txn failures:
--------------------------------------------------
- A post-op wound on TA takes AFR_TA_DOM_NOTIFY range lock and
AFR_TA_DOM_MODIFY full lock, does xattrop on TA and releases
AFR_TA_DOM_MODIFY lock and stores in-memory which brick is bad.
- All further write txn failures are handled based on this in-memory
value without querying the TA.
- When shd heals the files, it does so by requesting full lock on
AFR_TA_DOM_NOTIFY domain. Client uses this as a cue (via upcall),
releases AFR_TA_DOM_NOTIFY range lock and invalidates its in-memory
notion of which brick is bad. The next write txn failure is wound on TA
to again update the in-memory state.
- Any incomplete write txns before the AFR_TA_DOM_NOTIFY upcall release
request is got is completed before the lock is released.
- Any write txns got after the release request are maintained in a ta_waitq.
- After the release is complete, the ta_waitq elements are spliced to a
separate queue which is then processed one by one.
- For fops that come in parallel when the in-memory bad brick is still
unknown, only one is wound to TA on wire. The other ones are maintained
in a ta_onwireq which is then processed after we get the response from
TA.
Change-Id: I32c7b61a61776663601ab0040e2f0767eca1fd64
updates: bz#1648205
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/afr/ta.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/basic/afr/ta.t b/tests/basic/afr/ta.t index 20c29784eaf..d8beb1be461 100644 --- a/tests/basic/afr/ta.t +++ b/tests/basic/afr/ta.t @@ -32,11 +32,11 @@ EXPECT "000000010000000200000000" get_hex_xattr trusted.afr.$V0-client-0 $B0/bri TEST ! ls $B0/brick0/b.txt TEST ls $B0/brick1/b.txt -#This is not working as expected -#TEST ta_kill_brick ta -#TEST touch $M0/c.txt -#TEST ! ls $B0/brick0/c.txt -#TEST ! ls $B0/brick1/c.txt +TEST ta_kill_brick ta +# Entry create must fail since only 1 brick is up. +TEST ! touch $M0/c.txt +TEST ! ls $B0/brick0/c.txt +TEST ! ls $B0/brick1/c.txt TEST ta_start_brick_process brick0 EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" afr_child_up_status_meta $M0 $V0-replicate-0 0 |