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

treasure-data / perfectqueue / 90
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v0.8.54
DEFAULT BRANCH: master
Ran 22 Feb 2016 05:03AM UTC
Jobs 5
Files 45
Run time 28s
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

pending completion
90

push

travis-ci

nurse
Use CONNECTION_ID() for finer grained locking

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

This adds a new column `owner` 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

2862 of 2883 relevant lines covered (99.27%)

110.38 hits per line

Jobs
ID Job ID Ran Files Coverage
1 90.1 (1.9.3) 22 Feb 2016 05:03AM UTC 0
99.24
Travis Job 90.1
2 90.2 (2.0.0) 22 Feb 2016 05:04AM UTC 0
99.27
Travis Job 90.2
3 90.3 (2.1.6) 22 Feb 2016 05:04AM UTC 0
99.27
Travis Job 90.3
4 90.4 (2.2.2) 22 Feb 2016 05:04AM UTC 0
99.27
Travis Job 90.4
5 90.5 (ruby-head) 22 Feb 2016 05:04AM UTC 0
99.27
Travis Job 90.5
Source Files on build 90
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #90
  • d42d66a2 on github
  • Prev Build on use-CONNECTION_ID (#76)
  • Next Build on use-CONNECTION_ID (#93)
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

© 2026 Coveralls, Inc