Can the BTree cleaner thread block a user transaction? -Help
Posted in 2000
Informix7.24 UC7 on Solaris 2.6, ESQL/C 7.24UC7
Hi everyone!
We have a process that used to run fine on our server for over a
year.
What the process does:
unload about 200 rows to a file
delete the same number of rows from the table
begin work
lock table in exclusive mode
drop and recreate three indexes (table has about 1800 rows).
commit work
run update statistics
The weird thing is that sometimes it runs fine, sometimes it
doesn't. I'd say it fails about 50% of the time. I would also
like to note that the isolation mode is the default Commited Read
and that the process doesn't set the lock mode to wait (please
don't ask me why :-()
The problem started to appear after I did some database
maintenance. (Exported the database, increased the size of
dbspaces/logical logs, Imported back the database, then ran
update statistics). Nothing was changed in the ONCONFIG file.
Anyway, I've looked at the contents of the logical log files at
the time the process tries to get an exclusive lock on the table
and it showed that, when it fails, the BTree cleaner thread was
doing its thing with the tblspace (obviously because of the prior
deletes). I know that the Btree cleaner thread runs like once a
minute but I don't know if it interferes with user processing. It
shouldn't right?
Here's what happened today (The process failed)
Output of onstat -k before the process ran
INFORMIX-OnLine Version 7.24.UC7 -- On-Line -- Up 14:18:03
-- 59000 Kbytes
Locks
address wtlist owner lklist type tblsnum rowid
key#/bsiz
0 active, 300000 total, 65536 hash buckets
Application Log:
02:39:21 LogInformation( archive_ftp_posack,
/xeasm/dev/WORK/log/arc, 1 )
02:39:21 ArchiveFtpPosack: Program archive_ftp_posack
Started!
02:39:22 ArchiveFtpPosack: Total rows that need to be
deleted=[199]
02:39:23 archive_ftp_posack: No rows found [100]
02:39:24 ArchiveFtpPosack: [199] rows deleted from
ftp_posack_tbl
02:39:24 ArchiveFtpPosack: Total rows deleted = [199]
02:39:24 ArchiveFtpWrite: BEGIN WORK.
********Error encountered in ArchiveFtpPosack: LOCK
ftp_posack_tbl********
----------------------------------------------------------
SQLSTATE: IX000
SQLCODE: -289
ISAM ERROR CODE: -113
SQLERRM: xeasm.ftp_posack_tbl
EXCEPTIONS: Number=2 More? N
- - - - - - - - - - - - - - - - - - - -
EXCEPTION 1: SQLSTATE=IX000
MESSAGE TEXT: Cannot lock table (xeasm.ftp_posack_tbl)
CLASS ORIGIN: IX
SUBCLASS ORIGIN: IX000
- - - - - - - - - - - - - - - - - - - -
EXCEPTION 2: SQLSTATE=IX000
MESSAGE TEXT: ISAM error: the file is locked.
CLASS ORIGIN: IX
SUBCLASS ORIGIN: IX000
----------------------------------------------------------
********Program terminated*******
Here are the contents of the logical logs at that time: (filtered
by tblspace)
INFORMIX-OnLine Logical Log display
Software Serial Number AAC#J602008
Copyright (C) 1987-1996 Informix Software, Inc.
Please mount tape and press Return to continue ...
log number: 535.
addr len type xid id link
40 24 CKPOINT 1 1 12f018 0
1018 24 CKPOINT 1 0 40 0
2018 24 CKPOINT 1 0 1018 0
3018 24 CKPOINT 1 0 2018 0
4018 32 BEGIN 30 535 0 01/31/00 01:45:03
626 xeasm
41b4 28 COMMIT 30 0 4164 01/31/00 01:45:03
41d0 32 BEGIN 30 535 0 01/31/00 01:45:10
626 xeasm
4278 28 COMMIT 30 0 424c 01/31/00 01:45:10
4294 32 BEGIN 30 535 0 01/31/00 01:45:13
626 xeasm
4430 28 COMMIT 30 0 43e0 01/31/00 01:45:13
444c 32 BEGIN 30 535 0 01/31/00 01:45:20
626 xeasm
44f4 28 COMMIT 30 0 44c8 01/31/00 01:45:20
4510 32 BEGIN 30 535 0 01/31/00 01:45:22
626 xeasm
46ac 28 COMMIT 30 0 465c 01/31/00 01:45:22
46c8 32 BEGIN 30 535 0 01/31/00 01:45:29
626 xeasm
4770 28 COMMIT 30 0 4744 01/31/00 01:45:29
5018 24 CKPOINT 1 0 3018 0
6018 32 BEGIN 30 535 0 01/31/00 02:05:34
629 xeasm
addr len type xid id link
6038 28 UNIQID 30 0 6018 600030 79774
6054 184 HINSERT 30 0 6038 600030 1d0b
146
610c 44 ADDITEM 30 0 6054 600030 1d0b
12 1 4
6138 44 ADDITEM 30 0 610c 600030 1d0b
259 2 1
6164 80 ADDITEM 30 0 6138 600030 1d0b
21 3 40
61b4 28 COMMIT 30 0 6164 01/31/00 02:05:35
61d0 32 BEGIN 30 535 0 01/31/00 02:05:42
629 xeasm
61f0 48 HUPDAT 30 0 61d0 600030 1d0b 0
146 146 1
6220 44 ADDITEM 30 0 61f0 600030 1d0b
259 2 1
624c 44 DELITEM 30 0 6220 600030 1d0b
259 2 1
6278 28 COMMIT 30 0 624c 01/31/00 02:05:42
7018 24 CKPOINT 1 0 5018 0
8018 32 BEGIN 30 535 0 01/31/00 02:12:20
631 xeasm
8038 28 UNIQID 30 0 8018 600030 79775
8054 184 HINSERT 30 0 8038 600030 1d0c
146
810c 44 ADDITEM 30 0 8054 600030 1d0c
12 1 4
8138 44 ADDITEM 30 0 810c 600030 1d0c
259 2 1
8164 80 ADDITEM 30 0 8138 600030 1d0c
25 3 40
addr len type xid id link
81b4 28 COMMIT 30 0 8164 01/31/00 02:12:20
81d0 32 BEGIN 30 535 0 01/31/00 02:12:27
631 xeasm
81f0 48 HUPDAT 30 0 81d0 600030 1d0c 0
146 146 1
8220 44 ADDITEM 30 0 81f0 600030 1d0c
259 2 1
824c 44 DELITEM 30 0 8220 600030 1d0c
259 2 1
8278 28 COMMIT 30 0 824c 01/31/00 02:12:27
9018 32 BEGIN 31 535 0 01/31/00 02:14:02
632 xeasm
9038 28 UNIQID 31 0 9018 600030 79776
9054 184 HINSERT 31 0 9038 600030 1d0d
146
910c 44 ADDITEM 31 0 9054 600030 1d0d
12 1 4
9138 44 ADDITEM 31 0 910c 600030 1d0d
259 2 1
9164 80 ADDITEM 31 0 9138 600030 1d0d
27 3 40
91b4 28 COMMIT 31 0 9164 01/31/00 02:14:02
91d0 32 BEGIN 31 535 0 01/31/00 02:14:09
632 xeasm
91f0 48 HUPDAT 31 0 91d0 600030 1d0d 0
146 146 1
9220 44 ADDITEM 31 0 91f0 600030 1d0d
259 2 1
924c 44 DELITEM 31 0 9220 600030 1d0d
259 2 1
9278 28 COMMIT 31 0 924c 01/31/00 02:14:09
addr len type xid id link
a018 24 CKPOINT