Skip to content

chore(deps): bump github.com/lanrat/extsort from 1.4.2 to 1.5.0 - #2250

Merged
alexeykiselev merged 1 commit into
masterfrom
dependabot/go_modules/github.com/lanrat/extsort-1.5.0
Oct 5, 2026
Merged

alexeykiselev merged 1 commit into
masterfrom
dependabot/go_modules/github.com/lanrat/extsort-1.5.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Bumps github.com/lanrat/extsort from 1.4.2 to 1.5.0.

Release notes

Sourced from github.com/lanrat/extsort's releases.

v1.5.0

Highlights

This release fixes several serious bugs in the sort pipeline: a hang, silent data loss, and crashes caused by user callbacks. It also makes sorting about 2× faster. Upgrading is recommended for everyone.

⚠️ Breaking changes

  • Go 1.25 or newer is required (previously 1.23), because of the golang.org/x/sync v0.22.0 upgrade.
  • diff.NEW and diff.OLD are now typed diff.Delta constants. Code that uses them as a plain int, such as var d int = diff.NEW, no longer compiles. Use diff.Delta, or convert with int(diff.NEW).

Behavior changes

  • Errors that were lost are now reported. Read errors during the merge, panics in a legacy FromBytes, and temp-file Close errors now arrive on the error channel. If you were getting incomplete output with a nil error, you'll now get an error instead.
  • Callback panics no longer crash the process. A panic in your compare, fromBytes or toBytes function during the save or merge stage is returned as a ComparisonError, DeserializationError or SerializationError.
  • An unusable explicit TempFilesDir is an error again. A path that is a regular file, or that has no write permission, now fails instead of silently falling back to /var/tmp. This restores the behavior from before v1.4.1. A directory that doesn't exist yet is still created.
  • The temp file is created only when needed, once the input needs more than one chunk. Temp-file errors arrive on the error channel, and the constructors never return a nil sorter.
  • ChanBuffSize now defaults to 1 (previously 16), matching the docs and using less memory. A zero value still means unbuffered, and the docs now say so.
  • Concurrency is documented. Your compare, fromBytes and toBytes functions may be called from several goroutines at once. The legacy New() / NewMock() API now serializes calls to your FromBytes, restoring the thread safety it had before v1.1.0.
  • Default temp-dir discovery creates and removes one probe file per candidate directory, once per process.
  • diff with an already-cancelled context now returns immediately.

Bug fixes

  • Sort() no longer hangs forever when saving a chunk fails, for example on a full disk.
  • A read error on a chunk's first record no longer silently drops the chunk.
  • Closing the temp file can no longer panic with "send on closed channel".
  • Small, empty and failed sorts no longer leak temp files and file descriptors. On Windows, temp files are now removed.
  • Default temp-dir selection falls back correctly when /var/tmp is missing or read-only, for example under Kubernetes readOnlyRootFilesystem. This was a regression in v1.4.1.
  • Sorting no longer spins for up to 2×ChunkSize iterations after the input closes. A 10-record sort went from about 50 ms to microseconds.
  • Several sorters can now share one *Config without a data race. The caller's struct is no longer modified.
  • diff no longer hangs when an error channel is never closed, and it respects context cancellation.
  • UniqStringChan now accepts the <-chan string returned by Strings().

New

  • diff.StringResultChanContext(ctx) works like StringResultChan but stops when ctx is cancelled.

Performance

  • Records move between merge workers in batches instead of one at a time.
  • Ordered uses a binary codec instead of creating a gob encoder for every record.
  • Strings and Ordered reuse their encode and decode buffers.
  • Merge read buffers are allocated lazily and sized to each chunk, so memory no longer grows with the chunk count (2,000 chunks: 137 MB → 7 MB).
  • Chunks grow as needed instead of allocating ChunkSize up front.
  • The unneeded fsync on the temp file is removed.

Benchmarks, Apple M5 Max:

Benchmark Before After

... (truncated)

Commits
  • a49dcec test: detect temp files in the single-chunk optimization tests
  • cffc0e8 release: refuse to tag a dirty, stale or non-main tree
  • 0ff3472 Merge pull request #15 from lanrat/claude/extsort-perf-batching
  • dab2261 Reuse the encode and decode buffers of the built-in codecs
  • 9ce531a Grow chunks instead of allocating ChunkSize up front
  • 925c333 Receive input without locking ctx's channel for every record
  • 07d4eec Batch records between the parallel merge workers and the final merge
  • 60595a6 Remove the unused byteSlicePool
  • 584a942 diff: receive without locking ctx's channel for every value
  • 2129eb8 queue: keep elements in a heap of values
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Oct 5, 2026
Bumps [github.com/lanrat/extsort](https://github.com/lanrat/extsort) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/lanrat/extsort/releases)
- [Changelog](https://github.com/lanrat/extsort/blob/main/release.mk)
- [Commits](lanrat/extsort@v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/lanrat/extsort
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/github.com/lanrat/extsort-1.5.0 branch from c80af92 to d7cd0e7 Compare October 5, 2026 07:13
@alexeykiselev alexeykiselev added the run-itests Set this label to start the integration tests for the PR, it is removed automatically. label Oct 5, 2026
@github-actions github-actions Bot removed the run-itests Set this label to start the integration tests for the PR, it is removed automatically. label Oct 5, 2026
@alexeykiselev
alexeykiselev merged commit 8294f0d into master Oct 5, 2026
16 of 17 checks passed
@alexeykiselev
alexeykiselev deleted the dependabot/go_modules/github.com/lanrat/extsort-1.5.0 branch October 5, 2026 08:30

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant