Re: Autonomous Transaction Sequencing

From: Stefan Knecht <knecht.stefan_at_gmail.com>
Date: Sat, 13 Jan 2018 23:58:17 +0700
Message-ID: <CAP50yQ-=ve+KUnXgNSQU4Nv3Dmf3qK35_tX0BVdDr7BJhgbd+A_at_mail.gmail.com>



The environment is virtual, yes. I however don't see any VKTM (or other process) messages about time drifts in any trace file. Most recent tests now were on 12.2 as well, which I believe has fixed most of the vktm bugs (high cpu usage, etc).

I won't have time to run traces and all until late next week, but I suppose the way to see what's really happening would be a 10046. It's slightly problematic as I have so many good runs and only a few runs every couple 100 runs which show the anomaly.

Stefan

On Sat, Jan 13, 2018 at 5:58 PM, Martin Berger <martin.a.berger_at_gmail.com> wrote:

> Hi Stefan,
>
> can you set in your main block (before you call set_start) something like
>
> DBMS_SESSION.SET_IDENTIFIER(something-unique);
> and in every procedure
>
> DBMS_APPLICATION_INFO.SET_ACTION ('set_begin');
>
> and then trace the calls?
>
> I am curious if the negative time is visible there also.
>
> Martin
>
>
>
>
> 2018-01-13 9:01 GMT+01:00 Stefan Knecht <knecht.stefan_at_gmail.com>:
>
>> 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
>> | _at_zztat_oracle
>>
>
>

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

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Jan 13 2018 - 17:58:17 CET

Original text of this message