Skip to content

Commit 5624517

Browse files
committed
Increase default backoff to 2000ms for stream retries
1 parent 488541f commit 5624517

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- Add unit and integration tests for error handling and helper functions
77
- Disable Dependabot updates
88
- Update dependencies (`req` and `ex_doc`) and local cached `collinfo.json`
9+
- Implement exponential backoff with jitter retry strategy for fetching indexes
10+
- Stream index partition files entirely in-memory without downloading to disk, resolving disk space leak issues
911

1012
## [0.3.4] - 2025-07-19
1113
- Implement `stream_host/3` for streaming index entries by host

lib/common_crawl/index.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ defmodule CommonCrawl.Index do
149149
* `:preprocess_fun` - function to preprocess the stream before processing (default: & &1)
150150
* `:dir` - temporary directory for storing downloaded files (default: System.tmp_dir!())
151151
* `:max_attempts` - maximum number of retry attempts for fetching cluster.idx (default: 3)
152-
* `:backoff` - milliseconds to wait between retry attempts (default: 500)
152+
* `:backoff` - milliseconds to wait between retry attempts (default: 2000)
153153
154154
## Examples
155155
@@ -168,7 +168,7 @@ defmodule CommonCrawl.Index do
168168
def stream(crawl_id, opts \\ []) do
169169
preprocess_fun = Keyword.get(opts, :preprocess_fun, & &1)
170170
max_attempts = Keyword.get(opts, :max_attempts, 3)
171-
backoff = Keyword.get(opts, :backoff, 500)
171+
backoff = Keyword.get(opts, :backoff, 2000)
172172

173173
req_opts = Keyword.drop(opts, [:preprocess_fun, :max_attempts, :backoff, :dir])
174174

0 commit comments

Comments
 (0)