CACHE WRITER'
-------------

                 Key: CORE-4309
                 URL: http://tracker.firebirdsql.org/browse/CORE-4309
             Project: Firebird Core
          Issue Type: Bug
            Reporter: Pavel Zotov


DDL:
####
set term ^;
execute block as
declare n int = 100000000;
declare i int = 0;
begin
  while (i<n) do begin

     insert into t(id,s01,s02) 
     values(  :i
             ,rpad('', 8, uuid_to_char(gen_uuid()))
             ,rpad('', 8, uuid_to_char(gen_uuid()))
            );
     if (mod(i,1000000)=0) then i=i+0*gen_id(g,1000000);

     i=i+1;
  end
end ^
set term ;^
commit;

TEST:
#####

attach #1
=======
$ isql localhost/3330:/var/db/fb30/tmp_30813_extents.fdb
SQL> update t set s01=s02, s02=s01; -- heavy query that will run a few minutes

attach #2 (during attach #1 performs update)
=======
$ isql localhost/3330:/var/db/fb30/tmp_30813_extents.fdb
SQL> set list on;
SQL> commit; select * from mon$attachments where mon$user containing 'writer';

MON$ATTACHMENT_ID               292
MON$SERVER_PID                  8882
MON$STATE                       0
MON$ATTACHMENT_NAME             /var/db/fb30/tmp_30813_extents.fdb
MON$USER                        Cache Writer                                    
                                 
MON$ROLE                        <null>
MON$REMOTE_PROTOCOL             <null>
MON$REMOTE_ADDRESS              <null>
MON$REMOTE_PID                  <null>
MON$CHARACTER_SET_ID            0
MON$TIMESTAMP                   2013-12-30 20:18:16.2360
MON$GARBAGE_COLLECTION          1
MON$REMOTE_PROCESS              <null>
MON$STAT_ID                     11
MON$CLIENT_VERSION              <null>
MON$REMOTE_VERSION              <null>
MON$REMOTE_HOST                 <null>
MON$REMOTE_OS_USER              <null>
MON$AUTH_METHOD                 <null>

SQL> commit; delete from mon$attachments where 
mon$attachment_id<>current_connection;
SQL> commit; select * from mon$attachments where mon$user containing 'writer';
SQL> -- no rows! --

Where record for 'CACHE WRITER' disappear ?

PS.
SQL> show version;
ISQL Version: LI-T3.0.0.30813 Firebird 3.0 Alpha 2
Server version:
Firebird/Linux/AMD/Intel/x64 (access method), version "LI-T3.0.0.30813 Firebird 
3.0 Alpha 2"
Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-T3.0.0.30813 Firebird 
3.0 Alpha 2/tcp (oel64)/P13:C"
Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.30813 
Firebird 3.0 Alpha 2/tcp (oel64)/P13:C"
on disk structure version 12.0
SQL> show database;
Database: localhost/3330:/var/db/fb30/tmp_30813_extents.fdb
        Owner: SYSDBA
PAGE_SIZE 4096
Number of DB pages allocated = 1804832
Sweep interval = 20000
Forced Writes are ON
Transaction - oldest = 478
Transaction - oldest active = 539
Transaction - oldest snapshot = 539
Transaction - Next = 551
ODS = 12.0
Default Character set: NONE

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to