WIP: Add metadata to store record (#1604)

* Add metadata to store record

* Add metadata to cockroach store

* add metadata to store service implementation

* fix breaking cache test

* Test/fix cockroach metadata usage

* fix store memory metadata bug
This commit is contained in:
Asim Aslam
2020-06-03 09:45:08 +01:00
committed by GitHub
parent e4e56b0f3f
commit 7b379bf1f1
10 changed files with 1378 additions and 937 deletions

View File

@@ -28,16 +28,19 @@ func TestCache(t *testing.T) {
_, err := cachedStore.Read("test")
assert.Equal(store.ErrNotFound, err, "Read non existant key")
r1 := &store.Record{
Key: "aaa",
Value: []byte("bbb"),
Key: "aaa",
Value: []byte("bbb"),
Metadata: map[string]interface{}{},
}
r2 := &store.Record{
Key: "aaaa",
Value: []byte("bbbb"),
Key: "aaaa",
Value: []byte("bbbb"),
Metadata: map[string]interface{}{},
}
r3 := &store.Record{
Key: "aaaaa",
Value: []byte("bbbbb"),
Key: "aaaaa",
Value: []byte("bbbbb"),
Metadata: map[string]interface{}{},
}
// Write 3 records directly to l2
l2.Write(r1)