DOYUNG YOON created S2GRAPH-181:
-----------------------------------

             Summary: MutateVertices yield different state with different 
storage type.
                 Key: S2GRAPH-181
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-181
             Project: S2Graph
          Issue Type: Bug
            Reporter: DOYUNG YOON


Find out different properties of the vertex with `RocksStorage` backend.

`ServiceColumn` is defined as follow.

{noformat}
{
        "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
                }
        ]
}
{noformat}

`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.

{noformat}
[{
        "id": 1,
        "props": {
                "is_active": true
        },
        "timestamp": 1417616431
}]
{noformat}

The second `insert` request.

{noformat}
[{
        "id": 1,
        "props": {
                "phone_number": "abcdefg"
        },
        "timestamp": 1417616432
}]
{noformat}

The expected state on vertex 1 should be following.

{noformat}
{
        "id": 1,
        "props": {
                "is_active": true,
                "phone_number": "abcdefg",
                "nickname": "..", // default value.
                "age": 0 // default value.
        }
}
{noformat}

Above is what fetched vertex looks like when storage backend is 
`AsynchbaseStorage`, but `RocksStorage` gives different vertex.

{noformat}
{
        "id": 1,
        "props": {
                "is_active": false, // default value
                "phone_number": "abcdefg",
                "nickname": "..", // default value.
                "age": 0 // default value.
        }
}
{noformat}

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`.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to