When I try to set the metadata version key using the SetVersionstampedValue
atomic operation, the transaction always returns with the error code 2000 (“Invalid API call”). I’m trying to set a value where the first 10 bytes are the versionstamp and the last 8 bytes are a 64-bit uint (18 bytes in total). I’m doing this via the golang client:
// 10 bytes for the version stamp, 8 bytes
// for my data, 4 bytes for the offset.
key := fdb.Key(append([]byte{0xff}, []byte("/metadataVersion")...)
param := make([]byte, 10+8+4)
for i := 0; i < 8; i++ {
param[10+i] = myData[i]
}
transaction.SetVersionstampedValue(key, param)
I noticed the Go bindings have a test for this function, but it’s using API version 400. I change the MustAPIVersion()
call to use 610 (which is the version I’m using) then the set transaction begins to error out.
How do I use the SetVersionstampedValue
operation on API version 610?