Autonomous Transaction Sequencing

  • From: Stefan Knecht <knecht.stefan@xxxxxxxxx>
  • To: oracle-l-freelists <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 13 Jan 2018 15:01:49 +0700

Hi all

If you have a code structure similar to this:

begin
procedure set_start
is
pragma autonomous_transaction;
begin
update t set start_time=systimestamp;
commit;
end;
procedure set_end
is
pragma autonomous_transaction;
begin
update t set end_time=systimestamp;
commit;
end;
begin
set_start;
-- run some code here that takes anywhere between 0.1 and 2 seconds to
complete
commit;
set_end;
end;
/

I have some executions of this code, 40 out of 6000 runs, where I end up
with the end_time being a timestamp BEFORE the begin_time and not just a
microsecond or two. 0.4 seconds, 0.6 seconds. A significant amount of time.

This leads me to believe that Oracle somehow fires autonomous transactions
asynchronously or out of order of the code structure?

Before I go off on a digging spree - has anyone seen this before or has an
explanation?

Oracle 12.1 on *nix.

Cheers

Stefan




-- 
//
zztat - The Next-Gen Oracle Performance Monitoring and Reaction Framework!
Visit us at zztat.net | Support our Indiegogo campaign at igg.me/at/zztat |
@zztat_oracle

Other related posts: