mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT. Speeds up transactions by over 1000 times, should be NFS safe. New program: xs_tdb_dump to dump raw TDB contents. Don't do failure testing: we are no longer robust against all ENOMEM 8( Introduce "struct node" which contains perms, children and data. Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints. Gently modify TDB to use talloc, not do alloc on tdb_delete. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
44 lines
904 B
Plaintext
44 lines
904 B
Plaintext
# Test transaction clashes.
|
|
|
|
mkdir /test
|
|
write /test/entry1 contents
|
|
|
|
# Start transaction, do read-only op, transaction succeeds
|
|
1 start
|
|
1 write /test/entry1 contents2
|
|
expect contents
|
|
read /test/entry1
|
|
1 commit
|
|
expect contents2
|
|
read /test/entry1
|
|
|
|
# Start transaction, abort other transaction, transaction succeeds.
|
|
1 start
|
|
1 write /test/entry1 contents3
|
|
start
|
|
write /test/entry1 contents
|
|
abort
|
|
1 commit
|
|
expect contents3
|
|
read /test/entry1
|
|
|
|
# Start transaction, do write op, transaction fails
|
|
1 start
|
|
1 write /test/entry1 contents4
|
|
write /test/entry1 contents
|
|
expect 1: commit failed: Resource temporarily unavailable
|
|
1 commit
|
|
expect contents
|
|
read /test/entry1
|
|
|
|
# Start transaction, do other transaction, transaction fails
|
|
1 start
|
|
1 write /test/entry1 contents4
|
|
start
|
|
write /test/entry1 contents5
|
|
commit
|
|
expect 1: commit failed: Resource temporarily unavailable
|
|
1 commit
|
|
expect contents5
|
|
read /test/entry1
|