Skip to content

Improve getRecords#449

Merged
sanderpick merged 4 commits intotextileio:masterfrom
anyproto:improve/get-records
Oct 16, 2020
Merged

Improve getRecords#449
sanderpick merged 4 commits intotextileio:masterfrom
anyproto:improve/get-records

Conversation

@dgtony
Copy link
Copy Markdown
Contributor

@dgtony dgtony commented Oct 5, 2020

Related to #433

Do not request already known records for all logs contained in a thread on receiving a PushLog message.
It should help to reduce traffic and resources of both nodes and replicators.

Copy link
Copy Markdown
Contributor

@sanderpick sanderpick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! One question regarding protocol change procedure.

lid,
map[peer.ID]cid.Cid{lid: cid.Undef},
MaxPullLimit)
// TODO after protocol change request only new log
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, are you wanting to follow this up with a protocol change ASAP?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, as we previously discussed it, protocol change requires getting rid of record integrity check, and you've suggested that the next version of threads protocol should be issued. It'd be great, but not urgent now, as current PR already significantly reduces number of irrelevant records returned by the GetRecords request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, SGTM. I have some other changes that will be nice to get in before a protocol change. So, will be nice to wait for those.

}

// return reconstructed sequence and success flag
func (s *recordSequence) List() ([]linkedRecord, bool) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, clever 💯

Signed-off-by: Anton Dort-Golts <dortgolts@gmail.com>
Signed-off-by: Anton Dort-Golts <dortgolts@gmail.com>
Signed-off-by: Anton Dort-Golts <dortgolts@gmail.com>
Signed-off-by: Anton Dort-Golts <dortgolts@gmail.com>
@dgtony dgtony force-pushed the improve/get-records branch from 65ad995 to ed9c71b Compare October 15, 2020 18:03
@sanderpick sanderpick merged commit 8b51ad1 into textileio:master Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants