From 5bf6612a2e19693b7faa032187f02a019cbea700 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Sat, 20 Mar 2021 10:35:22 +0100 Subject: [PATCH] cmd/devp2p: fix error in updating the cursor when collecting records for route53 (#22538) This PR fixes a regression introduced in #22360, when we updated to the v2 of the AWS sdk, which causes current crawler to just get the same first 100 results over and over, and get stuck in a loop. --- cmd/devp2p/dns_route53.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/devp2p/dns_route53.go b/cmd/devp2p/dns_route53.go index b32a88535..010913060 100644 --- a/cmd/devp2p/dns_route53.go +++ b/cmd/devp2p/dns_route53.go @@ -315,8 +315,16 @@ func (c *route53Client) collectRecords(name string) (map[string]recordSet, error break } - // sets the cursor to the next batch + // Set the cursor to the next batc. From the AWS docs: + // + // To display the next page of results, get the values of NextRecordName, + // NextRecordType, and NextRecordIdentifier (if any) from the response. Then submit + // another ListResourceRecordSets request, and specify those values for + // StartRecordName, StartRecordType, and StartRecordIdentifier. + req.StartRecordIdentifier = resp.NextRecordIdentifier + req.StartRecordName = resp.NextRecordName + req.StartRecordType = resp.NextRecordType } return existing, nil