Skip to content

#2001 Document adaptive scheduler metadata#2002

Open
Yurii201811 wants to merge 2 commits into
apache:mainfrom
Yurii201811:docs/2001-adaptive-scheduler-metadata
Open

#2001 Document adaptive scheduler metadata#2002
Yurii201811 wants to merge 2 commits into
apache:mainfrom
Yurii201811:docs/2001-adaptive-scheduler-metadata

Conversation

@Yurii201811

Copy link
Copy Markdown

Summary

  • document the complete metadata set persisted by AdaptiveScheduler
  • use the exact lowercase last-modified key from the implementation
  • include fetch.statusCode, which the persisted-status path also requires

Fixes #2001

Validation

  • parsed the documented key list as YAML
  • git diff --check
  • attempted mvn -pl docs -am -DskipTests package; Maven Central returned HTTP 403 while resolving org.apache:apache:pom:39

Checklist

  • The issue is referenced in the commit and PR
  • The title starts with the issue number
  • The branch is based on the current target branch
  • The contribution is one commit
  • No code or dependencies changed

@rzo1
rzo1 requested a review from jnioche July 16, 2026 15:44
@rzo1 rzo1 added this to the 3.7.0 milestone Jul 16, 2026
@jnioche
jnioche requested review from rzo1 and removed request for jnioche July 16, 2026 17:20

@jnioche jnioche left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, are we sure last-modified needs lowercasing?

@rzo1

rzo1 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Looks good, are we sure last-modified needs lowercasing?

Good question — I checked the code. Short answer: for main (and thus the next release) the case doesn't matter, and lowercase is the better choice; for 3.5.1 and earlier it would actually have to be Last-Modified.

Details:

Since this doc change ships with the next release (which includes #1827), lowercase is correct here — it just shouldn't be backported to docs for older releases.

One small suggestion while we're at it: the sentence "The last-modified and protocol.etag fields allow conditional requests when scheduler.adaptive.setLastModified is enabled" is slightly misleading — setLastModified only controls whether the scheduler writes last-modified (→ If-Modified-Since); the protocol.etag / If-None-Match path works independently of that setting. Maybe reword to:

The last-modified field (written when scheduler.adaptive.setLastModified is enabled) and protocol.etag allow conditional requests (If-Modified-Since / If-None-Match).

@sebastian-nagel

Copy link
Copy Markdown
Contributor

Thanks, @Yurii201811!

Maybe reword to

+1 I'd second this.

Before protocol.md.prefix has been introduced by #776 (or if an empty prefix is configured), setLastModified controls whether the last-modified value sent by the responding server is overwritten in the persisted metadata.

On 3.5.1 and earlier (no #1827), AdaptiveScheduler stores the value under org.apache.http.HttpHeaders.LAST_MODIFIED = "Last-Modified" verbatim.

It was changed to lowercase in 527f936 and then back to Last-Modified by #1587.

While AdaptiveScheduler was introduced, it was a lower-case string constant. That's how its Javadoc describes it. But maybe the history it not really relevant, except you have to deal with an old status index.

@Yurii201811
Yurii201811 force-pushed the docs/2001-adaptive-scheduler-metadata branch from a00855c to e20cbca Compare July 17, 2026 08:44
@Yurii201811

Copy link
Copy Markdown
Author

Updated that sentence as suggested in e20cbca. Thanks for clarifying how the no-prefix case behaved.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] Document metadata to be persisted for adaptive scheduling

4 participants