Skip to content

Conversation

UlrichB22
Copy link
Collaborator

Fixes #1017.

  • The function get_indexer() becomes get_doc().
  • A new parameter retry is added to get_doc().
  • The retry and timeout in get_doc() only apply to calls from store_revision. At the end of this method, the revision that has just been written to the backend is read again. This ensures that this revision exists. In all other cases, e.g., when calling with an invalid, non-existent revid, get_doc immediately triggers a KeyError.

@roland-ruedenauer
Copy link
Contributor

Renaming this function is a good idea.

Some additional suggestions:

  • why not be more verbose and rename it into get_document
  • instead of passing in the magic fn argument pass in the indexer (instance of IndexingMiddleware) and call the required indexer method
  • use time.monotonic() instead of time.time()
  • change the code comment "Return a valid indexer document ..."

@UlrichB22 UlrichB22 marked this pull request as draft October 1, 2025 12:05
@UlrichB22 UlrichB22 marked this pull request as ready for review October 1, 2025 19:28
@UlrichB22
Copy link
Collaborator Author

@roland-ruedenauer, 🙏 thanks for your valuable suggestions and your help.

@UlrichB22 UlrichB22 requested a review from RogerHaase October 5, 2025 13:40
@RogerHaase RogerHaase merged commit 718db73 into moinwiki:master Oct 5, 2025
9 checks passed
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.

+feed/atom results in 4 "server overload or corrupt index" tracebacks
3 participants