#/*
## * (C) Copyright 2018-2021 Intel Corporation.
## *
## * SPDX-License-Identifier: BSD-2-Clause-Patent
## */
##/**
## * An example daos EPOCH IO test conf file.
## */
#
# io conf file format:
# 1) some setting:
# test_lvl xxx (daos or vos, default is daos)
# dkey xxx
# akey xxx
# iod_size xxx (default is 1)
# obj_class xxx(ec or replica, default is replica)
#
# 2) update
# 2.1) update array and take snapshot
# update --tx x --snap --recx "[idx_start1, idx_end1] [idx_start2, idx_end2] ..."
# The max number of recxs is 5 (IOREQ_IOD_NR).
# 2.2) update single type record and take snapshot
# update --tx x --snap --single
#
# If no --epoch specified, then use default epoch 1.
# Other two options: --dkey xxx --akey xxx. If not specified then use the last
# dkey/akey set at above 1).
# for the option name:
# --single      == -s
# --recx        == -r
# --dkey        == -d
# --akey        == -a
#
# 3) fetch and verify based on snapshot teaken after update.
# same parameter usage as above 2)
#
# 4) discard
#
# 5) punch
#

# 2+2 (OC_EC_2P2G1) EC obj degraded-fetch testing
# with full-stripe update plus partial overwrite

test_lvl daos
dkey dkey_4
akey akey_array_1
iod_size 1
obj_class ec OC_EC_2P2G1

update --tx 1 -r "[0, 131072]3"

update --tx 2 -r "[32812, 45777]7"

update --tx 5 -r "[131072, 2621444]9"
update --tx 6 -r "[65540, 130000]11"
fail_shard_fetch set 0 1
fetch --tx 7 -r "[0, 262144]"
fail_shard_fetch clear
fail_shard_fetch set 0 1
fetch --tx 7 -r "[163840, 262144]"
fail_shard_fetch clear
fail_shard_fetch set 0 1
fetch --tx 7 -r "[0, 32768] [65542, 65588] [65591, 65598]"
fail_shard_fetch clear

akey akey_single_1
iod_size 102
obj_class ec OC_EC_2P2G1
update --tx 11 -s -u 17
fail_shard_fetch set 0 2
fetch --tx 11 -s
fail_shard_fetch clear
