Issue Details (XML | Word | Printable)

Key: CORE-1801
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Andreas Rosenbaum
Votes: 0
Watchers: 1

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

Sweep can take a long time at 100% CPU

Created: 25/Mar/08 06:55 AM   Updated: 10/Mar/09 05:56 PM
Component/s: Engine
Affects Version/s: 2.0.1, 2.0.3, 2.1 RC1, 2.1 RC2, 2.0.4
Fix Version/s: None

File Attachments: 1. Zip Archive (2 kB)

Environment: Windows 2000, Windows XP

Sub-Tasks  All   Open   

 Description  « Hide
Sweep can take a long time after updating the same record many times while another transaction was open.

Steps to reproduce:

1) Preparation

create table testtable
  pk integer not null,
  dtvalue date

alter table testtable add constraint pk_testtable primary key (pk);
create index idx_dtvalue on testtable (dtvalue);

insert into testtable(pk, dtvalue)
values (1, current_timestamp);

2) open transaction 1

3) update record
open transaction 2
  "update testtable set dtvalue = current_timestamp where pk = 1;"
commit transaction 2
repeat step 3 100.000 times

4) commit transaction 1

5) trigger sweep
select * from testtable

Result: fbserver uses 100% CPU for several minutes (up to several hours when adding more columns and indizes to testtable)

The problem does not occur without index "idx_dtvalue" or with firebird 1.5.3

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 22/May/08 06:05 AM
Can't reproduce.

Vlad Khorsun added a comment - 22/May/08 06:06 AM
Test application

Vlad Khorsun added a comment - 08/Mar/09 10:29 AM
Should we close this ticket as non-reproducible ?

Dmitry Yemanov added a comment - 09/Mar/09 03:08 AM
Vlad, isn't it the issue we already discussed privately, at least twice? I mean very ineffective logic in list_staying().

Vlad Khorsun added a comment - 10/Mar/09 05:56 PM
Dmitry, i see no direct relation between this (not reproducible) issue and known weakness of list_staying.

Especially as Andreas see no problem :
> without index "idx_dtvalue" or with firebird 1.5.3

As for list_staying() we could create improvement request ;)