Skip to content
Snippets Groups Projects

catfile: Introduce request queues to allow batching reads

Merged Patrick Steinhardt requested to merge pks-catfile-queue into master
1 unresolved thread
5 files
+ 276
27
Compare changes
  • Side-by-side
  • Inline
Files
5
  • 084ae943
    Similar to the preceding commit, this commit splits out a new object
    info reader queue such that we can eventually change callers to use
    batched requests for object info.
    
    No change in behaviour is expected given that the queue is not yet used
    by anything except as implementation detail of the `Info()` function.
@@ -354,7 +354,7 @@ func TestCache_ObjectInfoReader(t *testing.T) {
// We're cheating a bit here to avoid creating a racy test by reaching into the
// process and trying to read from its stdout. If the cancel did kill the process as
// expected, then the stdout should be closed and we'll get an EOF.
output, err := io.ReadAll(objectInfoReaderImpl.stdout)
output, err := io.ReadAll(objectInfoReaderImpl.queue.stdout)
if err != nil {
require.True(t, errors.Is(err, os.ErrClosed))
} else {
Loading