No queue support with the Sleepycat::Db Perl interface?



I've been unsuccessful in trying to use the queue table type with the
Sleepycat::Db interface and I cannot figure out why.

===
use Sleepycat::Db;

my $db = new Db();
$db->open(undef, "test.db", undef, Db::DB_QUEUE, Db::DB_CREATE);

my($k, $v) = ('', 'test value');

$db->put($k, $v, Db::DB_APPEND);
===
results in:
Db::_put() -- txnid is not an object reference at (eval 2) line 13,
<DATA> line 345.

(transactions aren't configured, obviously)

No luck _with_ transactions either:
===
use Sleepycat::Db;

eval {
my $env = new DbEnv;
$env->open('testenv',
Db::DB_CREATE|Db::DB_INIT_MPOOL|Db::DB_INIT_TXN|Db::DB_INIT_LOCK,
0666);

my $db = new Db($env);
$db->open(undef, "test.db", undef, Db::DB_QUEUE,
Db::DB_CREATE|Db::DB_AUTO_COMMIT);

my($k, $v) = ('', 'test value');

my $txn = $env->txn_begin;
$db->put($txn, $k, $v, Db::DB_APPEND);
$txn->commit;
};

if($@) {
print $@->what, "\n";
}

===
Db::put: Invalid argument in test_queue_txn, line 18

I've tried a number of other ways with much the same result. Does
anyone know if queues are just not supported by Sleepycat::Db?

/Kim

.



Relevant Pages

  • Re: Newbie question about db normalization theory: redundant keys OK?
    ... fan of persistent message queues. ... If your queue is ... Or if some of the queued transactions can be rolled ... geographically separated databases storing account balances. ...
    (comp.databases.theory)
  • Re: Lahman, how ya doing?
    ... There can be times when the queue is completely comatose. ... and code reuse was at the bottom. ... >provided with the object for the original client. ... >use the access interface provided with the service rather than the one ...
    (comp.object)
  • Re: Multiple TSO logons (was: Patents, ...)
    ... Somehow I feel a major culprit is VTAM ... We allow users to logon as many times as they want to our TOR and execute the same transactions no matter what. ... One userid, one TS queue. ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: Interfaces and Events
    ... you have the queue as the focus point. ... William Stacey [MVP] ... Instead of using delegates and events, ...
    (microsoft.public.dotnet.languages.csharp)
  • altq and IPsec - queue on incoming interface
    ... Sometimes there is really need for ALTQ on incoming traffic: ... There is problem on queue on $ext_if. ... Use route-to loopback interface ... Then apply queue on outgoing traffic from lo0. ...
    (comp.unix.bsd.openbsd.misc)