mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
84c028674a
Explicitly convert tmap object data to omap keys. Removes the old tmap content at the same time. Signed-off-by: Sage Weil <sage@inktank.com>
29 lines
691 B
Bash
Executable File
29 lines
691 B
Bash
Executable File
#!/bin/sh -ex
|
|
|
|
expect_false()
|
|
{
|
|
set -x
|
|
if "$@"; then return 1; else return 0; fi
|
|
}
|
|
|
|
pool="pool-$$"
|
|
rados mkpool $pool
|
|
|
|
rados -p $pool tmap set foo key1 value1
|
|
rados -p $pool tmap set foo key2 value2
|
|
rados -p $pool tmap set foo key2 value2
|
|
rados -p $pool tmap dump foo | grep key1
|
|
rados -p $pool tmap dump foo | grep key2
|
|
rados -p $pool tmap-to-omap foo
|
|
expect_false rados -p $pool tmap dump foo
|
|
expect_false rados -p $pool tmap dump foo
|
|
|
|
rados -p $pool listomapkeys foo | grep key1
|
|
rados -p $pool listomapkeys foo | grep key2
|
|
rados -p $pool getomapval foo key1 | grep value1
|
|
rados -p $pool getomapval foo key2 | grep value2
|
|
|
|
rados rmpool $pool $pool --yes-i-really-really-mean-it
|
|
|
|
echo OK
|