IBM Support

IT17754: "UOW LOG SPACE USED" IN APP SNAPSHOT NEVER RESET WHEN USING XA TRANSACTION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The "UOW log space used" value can grow to impossible high
    values when the application is running in an XA environment.
    
    This is because the counter value will not get reset when doing
    the XPREPARE, and the counter will just increase.
    
    e.g. the following java code will cause the counter to increase,
    although there is a commit that should reset the counter to 0.
    
    public class Main {
    
        public static void main(String[] args) {
            try{
                DB2XADataSource db2XADataSource = new
    DB2XADataSource();
                db2XADataSource.setDatabaseName(args[0]);
                db2XADataSource.setUser(args[1]);
                db2XADataSource.setPassword(args[2]);
    
                XAConnection xaConnection =
    db2XADataSource.getXAConnection();
                XAResource xaResource =
    xaConnection.getXAResource();
                Xid xid2 = new MyXid(new byte[]{0x20}, new
    byte[]{0x22});
                for(int i=0;i<1000000;i++) {
                    xaResource.start(xid2, XAResource.TMNOFLAGS);
                    String sql = "insert into test select * from
    syscat.tables fetch first 10 rows only";
    
    xaConnection.getConnection().createStatement().execute(sql);
                    xaResource.end(xid2, XAResource.TMSUCCESS);
                    xaResource.prepare(xid2);
                    xaResource.commit(xid2, false);
                    System.out.println("Iteration"+i);
                }
    
            }
            catch (Exception e)
            {
                System.out.print(e.getMessage());
            }
        }
    }
    

Local fix

  • Using MON_GET_UNIT_OF_WORK to retrieve the log space used
    information.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 11.1 Mod 2 Fix Pack 2 or higher               *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 11.1 Mod 2 Fix Pack 2
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT17754

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-11-01

  • Closed date

    2017-06-23

  • Last modified date

    2017-06-23

  • APAR is sysrouted FROM one or more of the following:

    IT17717

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 June 2020