Details
-
Bug
-
Status: Done
-
Major
-
Resolution: Done
-
None
-
None
-
None
-
None
Description
Find out different properties of the vertex with `RocksStorage` backend.
`ServiceColumn` is defined as follow.
{ "serviceName": "s2graph", "columnName": "user", "columnType": "string", "props": [{ "name": "is_active", "dataType": "boolean", "defaultValue": false }, { "name": "phone_number", "dataType": "string", "defaultValue": "-" }, { "name": "nickname", "dataType": "string", "defaultValue": ".." }, { "name": "age", "dataType": "integer", "defaultValue": 0 } ] }
`insert` vertex with partial property(first insert request only has is_active, and the second one only has phone_number) should behave like 'upsert'.
The first `insert` request.
[{ "id": 1, "props": { "is_active": true }, "timestamp": 1417616431 }]
The second `insert` request.
[{ "id": 1, "props": { "phone_number": "abcdefg" }, "timestamp": 1417616432 }]
The expected state on vertex 1 should be following.
{ "id": 1, "props": { "is_active": true, "phone_number": "abcdefg", "nickname": "..", // default value. "age": 0 // default value. } }
Above is what fetched vertex looks like when storage backend is `AsynchbaseStorage`, but `RocksStorage` gives different vertex.
{ "id": 1, "props": { "is_active": false, // default value "phone_number": "abcdefg", "nickname": "..", // default value. "age": 0 // default value. } }
Note that `is_active` give default value instead of first value user inserted(the second request overwrite the first request).
Suggest to fix `RocksStorage` to behave like `AsynchbaseStorage`.
Attachments
Issue Links
- links to