Unexpected terminal print: Latest Entry Header in LSM Key

Moved from GitHub badger/1296

Posted by lidel:

What version of Go are you using (go version)?

$ go version
go version go1.14.1 linux/amd64

What version of Badger are you using?

github.com/dgraph-io/badger v1.6.1

Does this issue reproduce with the latest master?

I did not have bandwidth to check

What are the hardware specifications of the machine (RAM, OS, Disk)?

CPU: i7-4770S
RAM: 32GB
HDD: 11T

What did you do?

While running go-ipfs 0.5.0-rc1 I noticed this message printed to my terminal:

Latest Entry Header in LSM Key: !badger!move/blocks/AFKREICVWSZ4BCVY3SJSTPHPGVEHRJR5WCNTX3MCPI2GXU4IOPC6GD25TQÿÿÿÿÿþ Meta: 0 UserMeta: 0 Offset: 104817649 len(val)=262144
Latest Entry in Log Key: !badger!move/blocks/AFKREICVWSZ4BCVY3SJSTPHPGVEHRJR5WCNTX3MCPI2GXU4IOPC6GD25TQÿÿÿÿÿþ Meta: 0 UserMeta: 0 Offset: 596118870 len(val)=262144

IPFS-specific details in badgerds prints to terminal: Latest Entry Header in LSM Key · Issue #7131 · ipfs/go-ipfs · GitHub, but filling here as suggested by @Stebalien

jarifibrahim commented :

This could be a bug. Needs further investigation.
@lidel are you able to reproduce this issue reliably?

lidel commented :

Sadly no, I’ve been running go-ipfs against the same datastore for about a week but the terminal is silent now.

jarifibrahim commented :

@lidel please make a copy of the badger directory and the logs when the error shows up.

sanderpick commented :

Heya, I’m seeing this as well. Looks to be coming from ipfs-lite’s datastore. I can send the datastore repo somewhere if that would help.

Badger version v1.6.1

Latest Entry Header in LSM Key: !badger!move/peers/addrs/CIQAL23ZMPAELWMO4OUNOUB4YQNZWYVJPQSLFTHD7MMYKRBSDOLKA6Q�������� Meta: 0 UserMeta: 0 Offset: 53364477 len(val)=240973
Latest Entry in Log Key: !badger!move/peers/addrs/CIQAL23ZMPAELWMO4OUNOUB4YQNZWYVJPQSLFTHD7MMYKRBSDOLKA6Q�������� Meta: 0 UserMeta: 0 Offset: 226997418 len(val)=240973
Latest Entry Header in LSM Key: !badger!move/peers/addrs/CIQFMQ45KV4Z22RIFU6YUCKNXZGIDV3UQCU5E3BZOUBEQ5CJZGCSXAQ������� Meta: 0 UserMeta: 0 Offset: 77381670 len(val)=231234
Latest Entry in Log Key: !badger!move/peers/addrs/CIQFMQ45KV4Z22RIFU6YUCKNXZGIDV3UQCU5E3BZOUBEQ5CJZGCSXAQ������� Meta: 0 UserMeta: 0 Offset: 208253568 len(val)=231234

I also see this…

2020-07-16T14:16:17.296Z	ERROR	badger	go-ds-badger@v0.2.4/datastore.go:181	error during a GC cycle: Iteration function. Path=/data/textile/ipfslite/000749.vlog. Error=This shouldn't happen. Latest Pointer:{Fid:737 Len:184937 Offset:199371213}. Meta:2.

Error=This shouldn't happen… Murphy’s law? :sweat_smile:

jarifibrahim commented :

@sanderpick Can you send the data directory? I can spend some time and try to figure out what’s going on. You can send it to ibrahim[at]dgraph.io .

sanderpick commented :

Sure! Will take a bit to download. I’ll send to your email when ready.

sanderpick commented :

So, the whole repo is 268G. Do you need the whole thing or are there certain files that might do the trick?

jarifibrahim commented :

@sanderpick I don’t need the directory right now but please keep it saved somewhere. I believe this issue is similar to Remove the 'this entry should've caught' log from value.go (#1170) · dgraph-io/badger@2a90c66 · GitHub . There isn’t a bug, we’re logging an error which isn’t an error.

@sanderpick You can ignore the error. I’ll send a PR (and some tests) to verify my theory and remove the error logging.