• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

treasure-data / perfectqueue
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v0.8.54
DEFAULT BRANCH: master
Repo Added 07 Sep 2015 10:43AM UTC
Files 30
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH use-CONNECTION_ID
branch: use-CONNECTION_ID
CHANGE BRANCH
x
Reset
  • use-CONNECTION_ID
  • Sequel-UniqueConstraintViolation
  • add-TaskMonitorHook-spec
  • add-a-test-for-long-waiting-queue
  • add-more-specs
  • add-specs
  • avoid-deadlock-and-unlock-earlier
  • avoid_table_metadata_lock_part1
  • avoid_table_metadata_lock_part2
  • check-timeout-on-acquire
  • check-timeout-on-update-in-acquire
  • delete-v0.8.44-finished-tasks
  • disable-coveralls-outside-ci
  • dont-delete-finished-tasks-of-v0.8.46
  • enable-covealls
  • enhance_logging
  • ensure-kill-child
  • explicitly-specify-services-mysql
  • extend-rdb-connect-timeout
  • extract_max_retry_as_config
  • fix-cleanup_interval_count
  • fix-random-failure
  • force-index-for-acquire-query
  • get_rid_of_v07_client
  • include-spec-dir-for-simplecov
  • initial-logger-support
  • it-is-mysql2-ruby
  • keep-gziped-data-as-is
  • log-acquire-time
  • master
  • merge-v07
  • mysql-compress
  • parallel-acquire
  • randomize-initial-cleanup_interval_count
  • rdb-sslmode-support
  • relax-sequel
  • relax-sequel-version
  • remove-cancel_request
  • remove-huge-task-dump
  • remove-sqlite-support
  • remove-transaction
  • remove-unused-code
  • remove-useless-created_at-check
  • require-ahead-on-time
  • retry-connect
  • retry-connect-v08
  • retry-on-finish
  • revert-v0.8.44-migration-path
  • rspec3
  • run-48-delete-query-in-connect_locked
  • separate-delete-and-acquire-queries
  • sleep-between-lock-retry
  • stable-0.8.44
  • stress
  • stress-test-supports-multiple-queues
  • stress-test-tool
  • suppress-warning
  • use-DO-for-RELEASE_LOCK
  • use-timeout-for-44-compat
  • use-v08-strategy-if-with-resource-limit
  • v0.10.0
  • v0.10.1
  • v0.8.44
  • v0.8.44.1
  • v0.8.45
  • v0.8.46
  • v0.8.47
  • v0.8.48
  • v0.8.49
  • v0.8.50
  • v0.8.51
  • v0.8.51_for_test
  • v0.8.52
  • v0.8.53
  • v0.8.54
  • v0.9.0
  • v0.9.1
  • v0.9.2
  • v08
  • v08-sleep-between-lock-retry

pending completion
288

push

travis-ci

nurse
UPDATE first strategy

To acquire tasks, run UPDATE and SELECT insteadof SELECT and UPDATE.

This adds a new column `owner`, whose content is expected to be CONNECTION_ID(),
 to identify which connection acquires the task.
With this column, RDBCompatBackend#acquire now doesn't get table lock nor use
GET_LOCK(), but adopt mark-and-select method.
It locks only oldest N rows and their gaps during UPDATE.

CONNECTION_ID()
---------------

64bit unsigned integer from the server's internal thread ID counter.
This is unique while the MySQL server running.
http://dev.mysql.com/doc/refman/5.6/en/information-functions.html#function_connection-id
https://bugs.mysql.com/bug.php?id=19806

References
---------------

* http://yuuki.hatenablog.com/entry/go-and-mysql-jobqueue
* https://blog.engineyard.com/2011/5-subtle-ways-youre-using-mysql-as-a-queue-and-why-itll-bite-you
* https://github.com/treasure-data/perfectqueue/pull/15#discussion_r52893022

2081 of 2081 relevant lines covered (100.0%)

8.38 hits per line

Relevant lines Covered
Build:
Build:
2081 RELEVANT LINES 2081 COVERED LINES
8.38 HITS PER LINE
Source Files on use-CONNECTION_ID
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
288 use-CONNECTION_ID UPDATE first strategy To acquire tasks, run UPDATE and SELECT insteadof SELECT and UPDATE. This adds a new column `owner`, whose content is expected to be CONNECTION_ID(), to identify which connection acquires the task. With this column, RDBCom... push 24 Aug 2016 10:09AM UTC nurse travis-ci pending completion  
286 use-CONNECTION_ID connect_locked is back to ease migration push 18 Aug 2016 11:41AM UTC nurse travis-ci pending completion  
282 use-CONNECTION_ID connect_locked is back to ease migration push 18 Aug 2016 08:07AM UTC nurse travis-ci pending completion  
235 use-CONNECTION_ID Avoid checking created_at push 16 Jul 2016 06:48PM UTC nurse travis-ci pending completion  
232 use-CONNECTION_ID fix typo push 14 Jul 2016 08:24AM UTC nurse travis-ci pending completion  
231 use-CONNECTION_ID Use FOR UPDATE also the case with resource_limit push 14 Jul 2016 07:35AM UTC nurse travis-ci pending completion  
210 use-CONNECTION_ID Use FOR UPDATE also the case with resource_limit push 28 Jun 2016 11:53AM UTC nurse travis-ci pending completion  
206 use-CONNECTION_ID Use UPDATE first strategy only on disable_resource_limit If disable_resource_limit is not true, UPDATE first strategy may overcommit the resource. It can be avoided but on such use case performance is not required so much. push 20 Jun 2016 10:13AM UTC nurse travis-ci pending completion  
204 use-CONNECTION_ID fix for rebasing push 17 Jun 2016 03:41PM UTC nurse travis-ci pending completion  
203 use-CONNECTION_ID Use `FOR UPDATE` push 17 Jun 2016 03:02PM UTC nurse travis-ci pending completion  
See All Builds (1045)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc