-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Why would you want to lock messages?
Perhaps I'm being stupid here, but ..
we don't need a write lock for messages because they are written in
one pass
we don't need a read lock for any purpose at all, concurrent reads is
just fine,
we don't need a delete lock, only one process will want to delete a
message, the one that sends it.
If more than one process can attempt to send a single message at the
same time, then that's not a candidate for locking thats a bug in the
design surely?
d.
> -----Original Message-----
> From: okidz [mailto:okidz]On Behalf Of Oki DZ
> Sent: Thursday, June 14, 2001 2:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: James performance
>
>
> "John S. Gage" wrote:
> > Is the *locked* status saved in the DB? As a field in the
> message record
> > [what are the fields in the message record?] for example
> (perhaps the only
> > example)?
>
> mysql> describe Message;
> +-----------------+--------------+------+-----+-------------------
> --+-------+
> | Field | Type | Null | Key | Default
> | |
> Extra |
> +-----------------+--------------+------+-----+-------------------
> --+-------+
> | message_name | varchar(128) | | PRI |
> | |
> | repository_name | varchar(128) | | PRI |
> | |
> | message_state | varchar(30) | | |
> | |
> | error_message | varchar(200) | YES | | NULL
> | |
> | sender | varchar(100) | | |
> | |
> | recipients | text | | |
> | |
> | remote_host | varchar(100) | | |
> | |
> | remote_addr | varchar(20) | | |
> | |
> | message_body | longblob | | |
> | |
> | last_updated | datetime | | | 0000-00-00 00:00:00
> | |
> +-----------------+--------------+------+-----+-------------------
> --+-------+
>
> The answer would be "no".
>
> > Off the top of my head, if you are retrieving "message records"
> > from a database with a SELECT statement, as part of that SELECT
> statement you can
> > include an ORDER BY clause:
> >
> > SELECT * FROM Messages ORDER BY Locked ASC
> >
> > to bring to the top of the return table the records you want.
> Or you could
> > just include a WHERE clause.
> >
> > If the records *don't* include a "locked" field, it would be
> interesting to
> > know why not if it is possible to find out the locked status once
> > the messages are retrieved from the database.
>
> The message gets sent, and the record would be deleted.
>
> I think there'd be a problem if you had a "locked" field in the db;
> what if a record was locked, and James got restarted (or the
> machine died and assuming that the db was on a different machine).
> When James got
> resurrected, the record would be still in the locked status; as if
> that a thread had been sending it out, which in fact, none was. So
> the
> message would stay on the db forever.
>
> Oki
>
> --------------------------------------------------------------------
> - To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOyh5LUlGf1KbtpBnEQLCyQCeMP4ddiOkfG4QWZn/byeuZG8qrXUAn0xN
GqT+Wa8/qVwdDNScNH5qmy1X
=KVZx
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]