Thursday, March 29, 2012

Mediator Re-sequencer Purging

Mediator Re-sequencer purging

Earlier Mediator Re-sequencer tables were not considered for purging from purge scripts. We have included this from 11g Patch-set 5 onwards and did a back-port on the previous patches also

Purge scripts now considered below table while executing loop/parallel purge
1. MEDIATOR_GROUP_STATUS
2. MEDIATOR_RESEQUENCER_MESSAGE

There are couple constraints in executing purge on mediator re-sequencer tables

MEDIATOR_GROUP_STATUS
What can be purged

1. FOR BestEffort and FIFO groups in READY state,
2. We try to purge messages first and then the groups.This facilitate group purging.

What cannot be purged

1. Standard Mode Re-sequencer groups cannot be purged.
2. groups in running state cannot be purged(for all the strategy)


MEDIATOR_RESEQUENCER_MESSAGE.

1. Messages in COMPLETED and ABORTED state only can be purged. Rest all cannot be purged.


what are the different status available under above tables

Group states:

READY = 0; ->Purgeable
LOCKED = 1; ->NON Purgeable
ERROR = 3; ->NON Purgeable
TIMED_OUT=4; ->NON Purgeable
GROUP_ERROR=6; ->NON Purgeable

message states
READY = 0; ->Purgeable
LOCKED = 1; ->NON Purgeable
ERROR = 3; ->NON Purgeable
COMPLETED = 2; ->Purgeable
TIMED_OUT=4; ->Purgeable
ABORTED=5; ->Purgeable


Loop and parallel same scripts can be used from my old blog Executing Parallel Purge script andExecuting Loop Purge scrip

3 comments:

  1. Excellent post - btw. I went thru the purge scripts but saw no mention of the Mediator re-sequencing tables. Could you please point me in the right direction?

    Cheers
    Niall C.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. Thanks Niall, I shall update Mediator re-sequencing post with the table names.

    Tables that get affected are
    mediator_group_status
    mediator_resequencer_message

    During schema creation we take care of running soa_purge_scripts.sql (located at /rcu/integration/soainfra/sql/soa_purge/soa_purge_scripts.sql
    ) this creates necessary stored procedure for executing purge.
    NOTE: if you want you can still run above script from the rcu location


    If you want to debug more on how med- resequencer table used you may have to visit /rcu/integration/soainfra/sql/soa_purge/mediator and look for sql files there

    ReplyDelete