Can't unmarshal a partitioned cache
chlowell opened this issue · comments
Charles Lowell commented
Easy to repro with a unit test in partitioned_storage_test.go
:
func TestMarshal(t *testing.T) {
mgr := newPartitionedManagerForTest(nil)
b, err := mgr.Marshal()
if err != nil {
t.Fatal(err)
}
err = mgr.Unmarshal(b)
if err != nil {
t.Fatal(err)
}
}
Unmarshal
returns the error Unmarshal(*storage.InMemoryContract) only supports structs that have the field AdditionalFields or implements json.Unmarshaler
. And that's spot on, storage.InMemoryContract
doesn't have an AdditionalFields
field.
Bogdan Gavril commented
Solved by #456
Charles Lowell commented
Reopening because #456 didn't merge and it's still impossible to unmarshal a partitioned cache