-
1. Re: Replay transaction on XA
ataylor Sep 10, 2008 5:04 AM (in response to clebert.suconic)Regarding the 4 options.
1. A delete record shpould only mark a previous record as deleted and not contain extra info.
2. We still dont have the address to scan the queues for.
3. by this i think you mean always add an ack_message, currently we only add an ack_message if it isn't the last durable reference, otherwise we only add a delete record which has no extra info on it.
4. Again, i dont think this is correct, we need to remove the xid info anyway.
The most logical way, altho maybe not performant, is 3. If we're acking a message we should always write an ack record, but this means we are writing n + 1 record rather than n records where n is the number of durable references. -
2. Re: Replay transaction on XA
ataylor Sep 10, 2008 5:22 AM (in response to clebert.suconic)This would be the patch for option 3
http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=7232 -
3. Re: Replay transaction on XA
timfox Sep 10, 2008 5:34 AM (in response to clebert.suconic)I have gone through and reviewed the journal as promised.
I have just committed some changes, please can you look through, I have left various comments in the code.
Most of the changes were minor or cosmetic - there are still some unresolved questions (see comments), also more code comments are needed in places - e.g. record formats.
There are also some methods that are only used by tests (append methods taking byte[]) the tests should use the public interface methods which use encodingsupport.
I also removed a few remaining references to xids.
Now, regarding the issue at hand:
I prefer option 1). currently add and update records can take an arbitrary encoding support for data, we should just extend this for delete too. So for delete, we write the queue id, as we currently do for updates.
This is the most symmetrical solution imho.
Regarding adding extra data for xids in the prepare. After thought I think this is acceptable as long as no reference to xids in the code (I have removed them all now) - it's just extra data. -
4. Re: Replay transaction on XA
ataylor Sep 10, 2008 6:52 AM (in response to clebert.suconic)ok, ive implemented no. 1 locally, I have an issue with paging that i need to talk to clebert about when he's about and a few tests to fix then I'll check in.
-
5. Re: Replay transaction on XA
clebert.suconic Sep 10, 2008 8:29 AM (in response to clebert.suconic)"timfox" wrote:
There are also some methods that are only used by tests (append methods taking byte[]) the tests should use the public interface methods which use encodingsupport.
There a bunch of tests still referring the old method. I will make the tests to use an Encodingsupport that will use a byteArray and remove the test.I prefer option 1). currently add and update records can take an arbitrary encoding support for data, we should just extend this for delete too. So for delete, we write the queue id, as we currently do for updates.
This is the most symmetrical solution imho.
This would be an update-for-delete record?
Could we add this to the API?delete(long txID, long recordID, EncodingSupport data);
Then internally we would use the new update-to-delete record-type. -
6. Re: Replay transaction on XA
timfox Sep 10, 2008 8:39 AM (in response to clebert.suconic)"clebert.suconic@jboss.com" wrote:
This would be an update-for-delete record?
Could we add this to the API?delete(long txID, long recordID, EncodingSupport data);
Then internally we would use the new update-to-delete record-type.
Yes, that's the kind of thing I was thinking of.