Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sevenseacat
Copy link
Contributor

As discussed in Slack.

When supplying the timeout option to Ash.read, that timeout is not being used for the count query that also gets run (when fetching a total count, for pagination purposes).

Doing some testing via a Cinder table (as that's what the original error was coming from), when specifying query_opts={[timeout: 10000]} this gets passed through to the count query.

If no timeout is specified from the table, query.timeout is :infinity.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

{:ok, results} <- run_authorize_results(query, results),
{:ok, results, after_notifications} <- run_after_action(query, results),
{:ok, count} <- maybe_await(count) do
{:ok, count} <- maybe_await(count, query.timeout) do
Copy link
Contributor

Choose a reason for hiding this comment

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

It may not necessarily have a timeout, so we would likely want to do something like query.timeout || :infinity. Unless we set query.timeout to infinity automatically or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure tbh, but in my testing if I didn't set a timeout, it was infinity?

@zachdaniel zachdaniel merged commit c7f3bff into main Jun 24, 2025
43 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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.

3 participants