elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
306 stars 113 forks source link

queue_target / queue_interval: milliseconds, or microseconds? #178

Closed bgentry closed 5 years ago

bgentry commented 5 years ago

The docs for queue config currently state (formatting added):

Handling requests is done through a queue. When DBConnection is started, there are two relevant options to control the queue:

  • :queue_target in microseconds, defaults to 50
  • :queue_interval in microseconds, defaults to 1000

    Our goal is to stay under :queue_target for :queue_interval. In case we can't reach that, then we double the :queue_target. If we go above that, then we start dropping messages. For example, by default our queue time is 50ms. If we stay above 50ms for a whole secnod, we double the target to 100ms and we start dropping messages once it goes above the new limit.

The list specifically says microseconds with a default of 50, but down below it says ms which is the abbreviation for milliseconds. Which is correct? µs would be the correct abbreviation if microseconds was correct.

Also note the typo secnod. I would fix that on its own but figure it can be done at the same time as the more important doc fix this issue is about.

josevalim commented 5 years ago

Good catch! It is miliseconds. :) If you send a PR I will push new docs ASAP.