Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Support query execution timeout #25

Closed
kostja opened this issue Jan 30, 2018 · 3 comments
Closed

Support query execution timeout #25

kostja opened this issue Jan 30, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request prio1

Comments

@kostja
Copy link

kostja commented Jan 30, 2018

Allow to interrupt execution of a complex query when a timeout expires.

@kostja kostja added the prio1 label Jan 30, 2018
@Totktonada
Copy link
Member

Why we can not just create a fiber and kill it by timeout?

@Totktonada Totktonada added the enhancement New feature or request label Feb 1, 2018
@Khatskevich
Copy link
Contributor

Khatskevich commented Feb 20, 2018

The first implementation can be the following:

  • Set query_timeout variable to query context at the beginning of an execution.
  • Check fiber.time64() < query_timeout on each itaration.

Cons:

  • do not need any monitoring fiber-killers
  • fiber.time64() is fast

Disses:

  • fiber.timeout64() is updated on yields only and in case of local memex will not change during all query execution.

@Khatskevich
Copy link
Contributor

Key points:

  1. use clock.monotonic64() because it is fast and it changes without yields
  2. place the hook to accessor.new(), and move to tgql.compile after Single-point graphql constructor #59

Khatskevich added a commit that referenced this issue Mar 2, 2018
key points:
 - use clock.monotonic64() because it is fast and it changes without
   yields
 - add option `timeout_ms` to accessor.new()
 - after #59 the option should be moved to `tgql.compile()`

Closes #25
Khatskevich added a commit that referenced this issue Mar 2, 2018
key points:
 - use clock.monotonic64() because it is fast and it changes without
   yields
 - add option `timeout_ms` to accessor.new()
 - after #59 the option should be moved to `tgql.compile()`; see #63

Closes #25
Khatskevich added a commit that referenced this issue Mar 5, 2018
key points:
 - use clock.monotonic64() because it is fast and it changes without
   yields
 - add option `timeout_ms` to accessor.new()
 - after #59 the option should be moved to `tgql.compile()`; see #63

Closes #25
Khatskevich added a commit that referenced this issue Mar 7, 2018
key points:
 - use clock.monotonic64() because it is fast and it changes without
   yields
 - add option `timeout_ms` to accessor.new()
 - after #59 the option should be moved to `tgql.compile()`; see #63

Closes #25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request prio1
Projects
None yet
Development

No branches or pull requests

3 participants