Start_ts not being cleared before postings are written to disk

Report a Dgraph Bug

What version of Dgraph are you using?

20.03.1

Have you tried reproducing the issue with the latest release?

No but it most likely has the same issue.

Steps to reproduce the issue (command/config used to run Dgraph).

Create any data in Dgraph, then inspect the postings.

Example

 Uid: 1202698 Op: 1 Posting: [uid:1202698 val_type:UID op:1 start_ts:83461 ]
 Uid: 1092720 Op: 1 Posting: [uid:1092720 val_type:UID op:1 start_ts:83461 ]
 Uid: 1102665 Op: 1 Posting: [uid:1102665 val_type:UID op:1 start_ts:83461 ]
 Uid: 1012727 Op: 1 Posting: [uid:1012727 val_type:UID op:1 start_ts:83461 ]
 Uid: 1252616 Op: 1 Posting: [uid:1252616 val_type:UID op:1 start_ts:83461 ]
 Uid: 1232667 Op: 1 Posting: [uid:1232667 val_type:UID op:1 start_ts:83461 ]
 Uid: 1252617 Op: 1 Posting: [uid:1252617 val_type:UID op:1 start_ts:83461 ]
 Uid: 1192712 Op: 1 Posting: [uid:1192712 val_type:UID op:1 start_ts:83461 ]

The start_ts field is there but that field is only for processing in memory. It should be clear before writing to disk.

commit_ts should also be cleared before writing to disk although I didn’t see it in the data.

Expected behaviour and actual result.

The start_ts and commit_ts fields are cleared before posting lists are written to disk.

1 Like

Fixed by fix(Dgraph): Don't store start_ts in postings. by martinmr · Pull Request #6127 · dgraph-io/dgraph · GitHub