nebula icon indicating copy to clipboard operation
nebula copied to clipboard

test_vertices_index_and_data_consistency_check failed due to result mismatch.

Open xtcyclist opened this issue 3 years ago • 0 comments

________________ test_vertices_index_and_data_consistency_check ________________
[gw3] linux -- Python 3.8.10 /usr/bin/python3
/github/home/.local/lib/python3.8/site-packages/pytest_bdd/scenario.py:177: in scenario_wrapper
    _execute_scenario(feature, scenario, request, encoding)
/github/home/.local/lib/python3.8/site-packages/pytest_bdd/scenario.py:143: in _execute_scenario
    _execute_step_function(request, scenario, step, step_func)
/github/home/.local/lib/python3.8/site-packages/pytest_bdd/scenario.py:113: in _execute_step_function
    return_value = step_func(**kwargs)
tck/conftest.py:665: in result_should_be_relax_cmp
    cmp_dataset(request, exec_ctx, result, order=False, strict=False)
tck/conftest.py:585: in cmp_dataset
    assert res, "\n".join(msg)
E   AssertionError: Fail to exec: LOOKUP ON student WHERE student.age < 30 YIELD student.age AS age
E     Response: |age|
E     0: |16|
E     1: |39|
E     Expected: |age|
E     0: |16|
E     NotFoundRow: 
E     Location: insert/InsertIfNotExists.feature:281
E     Space: {'name': 'EmptyGraph_EQRYPN', 'vid_type': 'FIXED_STRING(20)', 'partition_num': 9, 'replica_factor': 1, 'charset': 'utf8', 'collate': 'utf8_bin'}
E     vid_fn: None
E   assert False

In this case, there is a single insert statement with multiple vertices sharing the same VID. The idea is supposed for the later inserts to overwirte previous ones on the same VID. If it happens so, only "li":("li", 16) would be selected by the following LOOKUP query. However, in the above case, "zhang":("zhang", 39) is returned.

I think this is a failed case caused by the lack of support for transactions.

    When try to execute query:
      """
      INSERT VERTEX
        student(name, age)
      VALUES
        "zhang":("zhang", 19),
        "zhang":("zhang", 29),
        "zhang":("zhang", 39),
        "wang":("wang", 18),
        "li":("li", 16),
        "wang":("wang", 38);
      """
    Then the execution should be successful
    When executing query:
      """
      LOOKUP ON student WHERE student.age < 30 YIELD student.age AS age
      """
    Then the result should be, in any order, with relax comparison:
      | age |
      | 16  |

xtcyclist avatar Sep 03 '22 15:09 xtcyclist