Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

problem with GC #1920

@nonsense

Description

@nonsense

As discussed in the #core chat room, it appears that there are still bugs with localstore GC, which result in the following storage indices (swarm-private-38 - broken ; swarm-private-0 - correct):

➜  ~ echo '{"jsonrpc":"2.0","method":"bzz_storageIndices","id":1}' | websocat ws://127.0.0.1:8001/api/v1/namespaces/pushsync/pods/http:swarm-private-38:8546/proxy/ -n --one-message | jq

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "gcExcludeIndex": 0,
    "gcIndex": 188484,
    "gcSize": 188484,
    "pinIndex": 0,
    "pullIndex": 1036970,
    "pushIndex": 0,
    "retrievalAccessIndex": 188484,
    "retrievalDataIndex": 1073923
  }
}
➜  ~ echo '{"jsonrpc":"2.0","method":"bzz_storageIndices","id":1}' | websocat ws://127.0.0.1:8001/api/v1/namespaces/pushsync/pods/http:swarm-private-0:8546/proxy/ -n --one-message | jq

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "gcExcludeIndex": 0,
    "gcIndex": 192540,
    "gcSize": 192540,
    "pinIndex": 0,
    "pullIndex": 192540,
    "pushIndex": 0,
    "retrievalAccessIndex": 192540,
    "retrievalDataIndex": 192540
  }
}
➜  ~

One idea by @janos is that this is due to handleChunkDelivery and namely the ModePutRequest at:

	if po >= depth || peerPO < po {
		mode = chunk.ModePutSync
	} else {
		// do not sync if peer that is sending us a chunk is closer to the chunk then we are
		mode = chunk.ModePutRequest
	}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions