Skip to content

[FEATURE]: 'commit' function return commit_ts #212

@seedoilz

Description

@seedoilz

Have you tried Pydgraph before this proposal? and did not find anything similar?

None

What you wanted to do.

I want to get the commit_ts by using pydgraph. However, the function 'commit()' doesn't return the commit_ts. By modifying line 238 in txn.py, I return the result of the function 'self._dc.commit_or_abort'.

 return self._dc.commit_or_abort(self._ctx, timeout=timeout,
                                     metadata=new_metadata,
                                     credentials=credentials)

Like this, I could get the commit_ts from the function 'commit()' .

The result is following:
start_ts: 260380200
commit_ts: 260380201

It will help us a lot in our research work if the result is returned.
Thank you in advance.

What you actually did.

No response

Why wasn't it great, with examples.

It is difficult to obtain the commit_ts from the function 'commit()'

txn.commit() # it doesn't have return values, making it difficult to get commit_ts

Additional information.

We are working on a lightweight white-box checking algorithm of snapshot isolation (SI): given an execution of a database, to check whether it satisfies SI.

The SI checking problem is NP-hard for general executions. So it is desirable to make use of the knowledge of how SI is actually implemented in databases.

The insight is that most databases, especially distributed databases, implement SI following the generic protocol using start-timestamps and commit-timestamps. With these timestamps of transactions in an execution, the SI checking problem becomes solvable in polynomial time. Therefore, we want to obtain these timestamps when generating executions.

It is crucial for us to really understand the meaning and roles of the start-timestamps and commit-timestamps in the database under testing. We must be very sure that we have obtained the right timestamps in the right way.

That is why we ask for help here.

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