Hi Emmanuel,
I've run some further tests (exactly same setup as before), as suggested by
Guillaume and cannot see any "begin" operations in the recovery log -
despite trying some operations with autocommit off and explicitly typing
"begin". Here is the relevant section of my recovery table in my recovery
log:-
288 | user | insert into tablea values(122, 'abc', 122) | | A |
0 | 286 | S | 65 | 1
289 | user | insert into tablea values(133, 'abc', 133) | | A |
0 | 287 | S | 78 | 1
290 | user | insert into tablea values(144, 'abc', 144) | | T |
287 | 288 | S | 33 | 1
291 | user | commit | | T |
287 | 0 | S | 0 | 0
292 | user | insert into tablea values(155, 'abc', 155) | | T |
288 | 289 | S | 30 | 1
293 | user | commit | | T |
288 | 0 | S | 0 | 0
294 | user | insert into tablea values(166, 'abc', 166) | | T |
289 | 290 | S | 29 | 1
295 | user | commit | | T |
289 | 0 | S | 0 | 0
296 | user | insert into tablea values(177, 'abc', 177) | | T |
290 | 291 | S | 28 | 1
297 | user | commit | | T |
290 | 0 | S | 0 | 0
log_id's 288 and 289 are autocommited (no "begin" in the recovery log)
log_id 290 - 291 are autocommit off (no explicit "begin")
log_id's 292 and 293, 294 and 295, 296 and 297 were added via SQL Explorer:
begin;
insert into tablea values ...;
commit;
So in summary, there is no "begin" captured in the recovery log at any time,
whether implied or explicitly typed (via SQL Explorer).
Here is a dump of my full_cluster.log file (debug on most packages) for the
sequence of things for the last operation (log_id's 296 and 297)...
So during recovery is the recovery code expecting to see a "begin" operation
in the recovery log for all non autocomitted operations? (so is failing to
add the row). Is the "begin" not being captured by Sequoia and hence not
logged to the recovery log? The log below shows that the implicit "begin"
(autocommit off - start of transaction - see log_id 296 above) is certainly
being detected. The explicit "begin" that I typed (before the insert into
...) however was not detected, nothing in the log.
Please let me know if you need any further testing done.
Regards
Ken
2007-01-15 10:56:24,919 DEBUG
virtualdatabase.VirtualDatabaseWorkerThread.virtualdb Begin command
2007-01-15 10:56:24,920 DEBUG controller.RequestManager.virtualdb Begin
transaction 290
2007-01-15 10:56:24,921 DEBUG
virtualdatabase.VirtualDatabaseWorkerThread.virtualdb statementExecute
command
2007-01-15 10:56:24,921 DEBUG controller.RequestManager.virtualdb Scheduling
write request (291): insert into tablea values(177, 'abc', 1...
2007-01-15 10:56:24,922 DEBUG controller.RequestManager.virtualdb Load
balancing write request (291,290): insert into tablea values(177, 'abc',
1...
2007-01-15 10:56:24,922 DEBUG sequoia.controller.recoverylog Logging request
296
2007-01-15 10:56:24,922 DEBUG backend.DatabaseBackend.db_primary Scheduling
request insert into tablea values(177, 'abc', 177) in non conflicting queue
2007-01-15 10:56:24,923 DEBUG sequoia.controller.recoverylog INSERT INTO
recovery VALUES(296,user,insert into tablea values(177, 'abc',
177),NULL,T,290,291,E,1,0)
2007-01-15 10:56:24,922 DEBUG backend.DatabaseBackend.db_backup Scheduling
request insert into tablea values(177, 'abc', 177) in non conflicting queue
2007-01-15 10:56:24,923 DEBUG backend.DatabaseBackend.db_primary Adding task
StatementExecuteUpdateTask from transaction 290 (insert into tablea
values(177, 'abc', 177)) to pending request queue
2007-01-15 10:56:24,923 DEBUG backend.DatabaseBackend.db_backup Adding task
StatementExecuteUpdateTask from transaction 290 (insert into tablea
values(177, 'abc', 177)) to pending request queue
2007-01-15 10:56:24,924 DEBUG backend.DatabaseBackend.db_primary Executing
task StatementExecuteUpdateTask from transaction 290 (insert into tablea
values(177, 'abc', 177))
2007-01-15 10:56:24,924 DEBUG backend.DatabaseBackend.db_backup Executing
task StatementExecuteUpdateTask from transaction 290 (insert into tablea
values(177, 'abc', 177))
2007-01-15 10:56:24,945 DEBUG backend.DatabaseBackend.db_backup Task
StatementExecuteUpdateTask from transaction 290 (insert into tablea
values(177, 'abc', 177)) completed
2007-01-15 10:56:24,949 DEBUG backend.DatabaseBackend.db_primary Task
StatementExecuteUpdateTask from transaction 290 (insert into tablea
values(177, 'abc', 177)) completed
2007-01-15 10:56:24,956 DEBUG sequoia.controller.recoverylog Logging request
296
2007-01-15 10:56:24,956 DEBUG sequoia.controller.recoverylog UPDATE recovery
SET exec_status=S,update_count=1,exec_time=28 WHERE log_id=296
2007-01-15 11:00:49,223 DEBUG
virtualdatabase.VirtualDatabaseWorkerThread.virtualdb Commit command
2007-01-15 11:00:49,224 DEBUG controller.RequestManager.virtualdb Commit
transaction 290
2007-01-15 11:00:49,224 DEBUG backend.DatabaseBackend.db_primary Adding task
CommitTask (290) to pending request queue
2007-01-15 11:00:49,225 DEBUG sequoia.controller.recoverylog Logging request
297
2007-01-15 11:00:49,225 DEBUG backend.DatabaseBackend.db_backup Adding task
CommitTask (290) to pending request queue
2007-01-15 11:00:49,225 DEBUG sequoia.controller.recoverylog INSERT INTO
recovery VALUES(297,user,commit,NULL,T,290,0,E,0,-1)
2007-01-15 11:00:49,225 DEBUG backend.DatabaseBackend.db_primary Executing
task CommitTask (290)
2007-01-15 11:00:49,225 DEBUG backend.DatabaseBackend.db_backup Executing
task CommitTask (290)
2007-01-15 11:00:49,252 DEBUG backend.DatabaseBackend.db_backup Task
CommitTask (290) completed
2007-01-15 11:00:49,252 DEBUG backend.DatabaseBackend.db_primary Task
CommitTask (290) completed
2007-01-15 11:00:49,253 DEBUG sequoia.controller.recoverylog Logging request
297
2007-01-15 11:00:49,253 DEBUG sequoia.controller.recoverylog UPDATE recovery
SET exec_status=S,update_count=0,exec_time=0 WHERE log_id=297
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Emmanuel
Cecchet
Sent: Friday, 12 January 2007 9:15 PM
To: Sequoia general mailing list
Subject: Re: [Sequoia] Database Recovery - only autocomitted operations are
recovered in to backends
Hi Ken,
It looks strange that there is no trace of 'begin' operation in your
log. Even if commit implicitly starts a new transaction, the new
transaction begin should be in the recovery log.
Do you see any 'begin' statement in the recovery log?
Thanks for the feedback,
Emmanuel
--
Emmanuel Cecchet
Chief Scientific Officer, Continuent
Blog: http://emanux.blogspot.com/
Open source: http://www.continuent.org
Corporate: http://www.continuent.com
Skype: emmanuel_cecchet
Cell: +33 687 342 685
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia
_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia