Skip to content

Unreliable Statistics#propertiesSet #141

@xujiaxj

Description

@xujiaxj

We are running a bunch of updating statements like this:

Statistics statistics = driver.query(graphId, query, params).getStatistics();
return statistics.propertiesSet();

The query variable is

MATCH (n:Service {site:$match_site, name:$match_name, namespace:$match_namespace, env:$match_env}) SET n.service_type=$service_type

and an example of the params variable is

{service_type=aurora-mysql, match_namespace=monitoring, match_site=dev, match_env=dev, match_name=aurora-mysql}

I assume if there is a match, the above code should return 1, and if there is no match, it should return 0.

Upon testing, I realize the return value is not reliable at all. Most of the time it returns 0 even though there is a match, so I wonder whether it only returns 1 if the update to service_type property actually changes the value. But then I noticed that in the cases it returns 1, there is a match but there is no change to the service_type property. In summary, neither 1 nor 0 means what I thought it is.

Can someone help explain?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions