Skip to content

Expose Last Index Request Timestamp in Cat Indices API #18405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rgsriram
Copy link
Contributor

Description

This PR enhances the _cat/indices API by adding two new columns to report the timestamp of the last index request processed for each index:

  • last_index_request_timestamp: The raw timestamp in milliseconds since epoch.
  • last_index_request_timestamp.string: The same timestamp in a human-readable UTC ISO 8601 format.

This mirrors the existing approach for creation.date and creation.date.string, providing both a machine-friendly and a human-friendly representation.

Details

  • The last_index_request_timestamp is updated on successful index and delete operations.
  • The cat indices API now exposes both the raw and formatted timestamp columns.
  • The columns can be queried as follows:
    GET _cat/indices?v&h=index,last_index_request_timestamp,last_index_request_timestamp.string

Manual Testing

  • Create an index and index a document.
  • Query the cat indices API with the new columns.
  • Confirm that the millisecond and string columns are present and correct.
  • Index another document and confirm the timestamp updates.
  • Test with multiple indices and edge cases (no docs, deleted index).

Related Issues

Resolves #10766

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

❌ Gradle check result for 3bfecce: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jun 1, 2025

❌ Gradle check result for 7678134: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jun 3, 2025

❌ Gradle check result for 5f0bca8: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jun 3, 2025

❌ Gradle check result for 6b68e2a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@rgsriram
Copy link
Contributor Author

rgsriram commented Jun 4, 2025

@andrross - Could you please kindly review once?

Copy link
Contributor

github-actions bot commented Jun 4, 2025

❌ Gradle check result for 6b68e2a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@rgsriram rgsriram force-pushed the index-stats-issue-10766 branch from 218511e to a6c40f7 Compare June 9, 2025 04:22
Copy link
Contributor

github-actions bot commented Jun 9, 2025

❌ Gradle check result for a6c40f7: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@rgsriram rgsriram force-pushed the index-stats-issue-10766 branch from 017298f to 6a974cd Compare June 9, 2025 05:25
Copy link
Contributor

github-actions bot commented Jun 9, 2025

❌ Gradle check result for 6a974cd: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jun 9, 2025

❌ Gradle check result for 8629442: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@rgsriram rgsriram force-pushed the index-stats-issue-10766 branch from 8629442 to 16e2d24 Compare June 11, 2025 05:34
Copy link
Contributor

❌ Gradle check result for 16e2d24: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@rgsriram rgsriram force-pushed the index-stats-issue-10766 branch from 897d357 to ef4e1ba Compare June 12, 2025 09:31
Copy link
Contributor

❌ Gradle check result for ef4e1ba: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Sriram Ganesh <[email protected]>
Copy link
Contributor

❌ Gradle check result for 834a86f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Sriram Ganesh <[email protected]>
Copy link
Contributor

❌ Gradle check result for 682e1c2: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Indexing & Search
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants