cloudfoundry / cloudfoundry/go-log-cache

Provide way to pass Descending Read option to the Walk command

Open
#27 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

unscheduled
Dominant language
Go
Stars
4
Forks
5
Avg merge
7h 20m
Merged PRs (30d)
4

Description

While we were working on CLI story, we want to have retry behavior for when we fetch the "MostRecentEnvelope". To do this, we wanted to read envelopes in descending order using the walk function (which currently has retry logic).

We found descending read option not be supported under the current walk function. Current implementation sets the read options explicitly.

As a workaround, we will decorate the client.Read function which is passed to Walk(). We will have it add the descending read option, and get the one envelope we need.

As an alternative approach, we suggest you consider moving retry from Walk to the lower-level Read function.

CC: @bwasmith

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vendor/code.cloudfoundry.org/log-cache/pkg/client/walk.go and inspect Walk's explicit read options and the lower-level Read entry point. Compare the two approaches described in the issue, then confirm which API should support descending reads while retaining the needed retry behavior. Done means callers can read envelopes in descending order through the Walk-related API.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.