GithubHelp home page GithubHelp logo

data-consumer's People

Contributors

atomicstack avatar davydovmax avatar demerphq avatar rgs avatar tsee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

data-consumer's Issues

Incorrect code in synopsys

Synopsis has this code snippet:

$consumer->consume( sub {
    my $id = shift;
    print "processed $id\n";
} );

This does not match description of consume() later in the pod, where it says consume callback receives ($consumer, $id, ...).

MySQL get_lock is no longer limited to one lock per session

Default query for MySQL uses get_lock function in the WHERE clause to find rows that are not locked by any other process and to lock one of them at the same time. E.g.:

select ... where flag=0 and get_lock(concat_ws('=', 'prefix', id))!=0

It relies on the fact that a database session is only allowed to hold one lock at a time, and get_lock is automatically releasing any previously held locks. This behaviour ensures that after this query is executed, worker has a row that isn't locked by anyone else and it has only one row locked.

This no longer works correctly under MySQL 5.7, which removed one-lock-per-session limitation. Now worker can end up locking as much as all rows in a table, preventing all other workers from claiming any items in the queue.

Data::Consumer::MySQL doesn't populate default values for state IDs

i.e. if you instantiate Data::Consumer::MySQL without specifying state values, like so:

my $consumer = Data::Consumer::MySQL->new(  
  dbh => $my_awesome_dbh,
  table => 'MyAwesomeTable',
); 

...then the item's flag_field will change to 1 as it's acquired by a consumer, and then remain at that value forever.

The docs say if you don't specify values for the different states, then the defaults are 0 .. 3, but this apparently isn't true :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.