Skip to content

v3.4 Chain Operations

Andrey Kurilov edited this page Jun 2, 2017 · 3 revisions

Introduction

Sometimes it's necessary to perform several I/O operations on each of items (files/objects/etc) asynchronously. For example, test step consist of several sub-steps. In the 1st step performs a create operation on each item. Then another sub-step may perform read opeation on the items passed the previous sub-step. If the so called chain test step is used each item is processed with a sequence of the I/O operations independently. For example create the items, after each item is created read it immediately, update and read again, then delete.

Requirements

  1. Support the configurable delay between the I/O operations. Disabled by default.
  2. Be able to perform the different I/O operations on the different set of the storage nodes. For example, create the items on one set of storage nodes then read each created item from another set of storage nodes.

Limitations

There are a set of parameters which are shared and may not be set for a sub-steps:

  • item-output-file
  • test-step-name
  • test-step-limit-rate
  • test-step-limit-time
  • storage-driver-remote

The values for these parameters will be taken from the 1st "config" element from the list (if any).

Configuration

Basic

The chain load step is supported on the scenario engine level. To define a sub step just add the node to the "config" section containing the list of the sub step nodes:

"type" : "chain",
"config" : [
    {
        ...
    }, {
        ...
    }, {
        ...
    }
]

This allows to configure the sub steps separately. For example, 1st sub step creates the items on the one storage node and the 2nd tries to read them immediately from another storage node:

{
	"type" : "chain",
	"config" : [
		{
			"item" : {
				"output" : {
					"path" : "/bucket1"
				}
			},
			"storage" : {
				"net" : {
					"node" : {
						"addrs" : "10.123.45.67"
					}
				}
			}
		},
		{
			"load" : {
				"type" : "read"
			},
			"storage" : {
				"net" : {
					"node" : {
						"addrs" : "10.123.45.68"
					}
                }
			}
		}
	]
}

Delay

It's possible to configure a delay for each item to be suspended before being processed by the next sub-step from the chain. The following example performs the writing the items. Each item will be read back not earlier than 1 minute after it is written.

{
	"type" : "chain",
	"config" : [
		{
			"item" : {
				"output" : {
					"delay" : "1m",
					"path" : "/bucket1"
				}
			}
		},
		{
			"load" : {
				"type" : "read"
			}
		}
	]
}

Note

  • Minimum delay is 1 second, 0 value means no delay.
  • In the distributed mode the system clocks should be synchronized precisely.
Clone this wiki locally