Issue Details (XML | Word | Printable)

Key: CORE-75
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: ceeam
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Adding index during DB activity causes GFIX errors

Created: 21/Feb/06 12:00 AM   Updated: 14/Jun/06 09:31 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

SF_ID: 1436066


 Description  « Hide
SFID: 1436066#
Submitted By: ceeam

I have a local app using FB DB. When background
process is working (adding lots of records to ITEM
table and related tables) and I add an index to ITEM
(by primary key field, descending, using IBExpert)
this causes later "index page error(s)" from "gfix -v -
full" ("gfix -v" does not complain). Here's firebird.
log line:

Index 3 is corrupt (missing entries) in table ITEM (
131)

It is pretty well reproduceable. Droping this index
and later re-creating it (during idle time) "fixes"
the DB. If you need further details please contact me:
cyrixm@gmail.com.

 All   Comments   Work Log   Change History   Version Control   FishEye      Sort Order: Ascending order - Click to sort in descending order
Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-24 08:18
Sender: hvlad
Logged In: YES
user_id=879552

As i understand some record versions created while index
build is not indexed. Error :

Index %d is corrupt (missing entries)

tell us exactly that. I'd say it is a real corruption

Fix prevents relation modifications until then while the index
will not be constructed completely. If somebody knows how
to construct a correct index and not forbid concurrent relation
modifications i am glad to learn it :)

Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-24 01:45
Sender: seanleyne
Logged In: YES
user_id=71163

Vlad,

Please clarify. Was this a real database corruption which
GFIX was reporting or an anomoly due to some disk
pages/structures not being created which GFIX was
expecting to find?

Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-23 13:26
Sender: hvlad
Logged In: YES
user_id=879552

Now 'create index' will request protected_read lock on
relation. This means that if you have active transaction in
which you perform insert\update\delete on relation 'create
index' will wait (or no_wait - it depends on transaction
parameters) until modifying transaction ends. And vice versa -
you can read but not write relation until index build is finished

Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-23 12:35
Sender: ceeam
Logged In: YES
user_id=1457907

Confirmed. ;)
Tried build 12345 - now attempt to add/change index to
table active in other transaction (and I think it goes for
any other meta-changes) results in "object in use" error
(with no_wait transaction of course). Well - it's better
than corrupted DBs, I think.
Thanks guys!

Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-22 16:04
Sender: hvlad
Logged In: YES
user_id=879552

As i understand this bug is very old and must exists in all
versions of FB
Fixed in build 12333.
Confirm please

Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-21 19:40
Sender: ceeam
Logged In: YES
user_id=1457907

Firebird 2.0 (Beta 2, though I noticed it first during Alfa
1, yes, I did backup/restore during update). Superserver.
WinXP SP2 (FAT32 partition if that matters).

Alice F. Bird added a comment - 14/Jun/06 09:31 AM
Date: 2006-02-21 19:35
Sender: seanleyne
Logged In: YES
user_id=71163

Please confirm the FB version you are running and the
platform/OS.