History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LDB-191
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: John V. Sichi
Reporter: John V. Sichi
Votes: 0
Watchers: 1
Operations

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

row counts get reset to 0 if reentrant SQL for ALTER TABLE REBUILD fails

Created: 08/Dec/08 07:40 PM   Updated: 11/Dec/08 09:08 PM
Component/s: LCS
Affects Version/s: 0.8.0
Fix Version/s: 0.9.0


 Description  « Hide
create schema x;
create table x.t(i int);
insert into x.t values (1), (2), (3);

0: jdbc:luciddb:> alter system set "cacheReservePercentage" = 98;
No rows affected (0.054 seconds)
0: jdbc:luciddb:> alter system set "cachePagesInit" = 5;
No rows affected (0.057 seconds)
0: jdbc:luciddb:> alter table x.t rebuild;
Error: Cache scratch memory exhausted (state=,code=0)
0: jdbc:luciddb:> alter system set "cachePagesInit" = 5000;
No rows affected (0.24 seconds)
0: jdbc:luciddb:> alter system set "cacheReservePercentage" = 5;
No rows affected (0.013 seconds)
0: jdbc:luciddb:> select current_row_count from sys_root.dba_stored_tables where table_name='T';
+--------------------+
| CURRENT_ROW_COUNT |
+--------------------+
| 0 |
+--------------------+
1 row selected (1.446 seconds)


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
John V. Sichi - 08/Dec/08 07:42 PM
This was already noted by Zelaine in comments; I'm just recording it here for reference by users. The failure can be either online (like in the example above) or a crash.

John V. Sichi - 09/Dec/08 10:50 PM
My ALTER TABLE ADD COLUMN implementation is inheriting the same problem, but I'm going to see if I can fix both.

John V. Sichi - 09/Dec/08 10:51 PM
A related issue is that if a hot backup starts while a rebuild is in progress, the hot backup will save the zeroed rowcounts :(

John V. Sichi - 11/Dec/08 09:08 PM
Fixed on //open/dev in eigenchange 12097.

Rowcount modification now takes place completely within LucidDbSessionPersonality.updateRowCounts, using special-case detection of the reentrant session's purpose.

For ALTER TABLE ADD COLUMN, no modification takes place.

For ALTER TABLE REBUILD, the reset takes place immediately before the increment.

For FTRS, no modification takes place for either (this was the status quo).