IBM Support

IT41901: LOCAL CACHE RETURNS NULL IF A KEY IS REUSED AFTER EXPIRY

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • If a key is re-used after expiring from a map then null is
    returned whenever that key is returned from the map. For
    example, the following test fails:
    @Test
     public void expiryTestWithReput() throws MbException {
       MbLocalMap map = new MbLocalMap();
       map.setTTL(1); //create entries that should already have
    expired
       Object object1 = new Object();
       Object object2 = new Object();
       map.put(object1, object2);
       try { Thread.sleep(1500); } catch(InterruptedException _ ) {
    }
       assertFalse(map.containsKey(object1));
       assertNull(map.get(object1));
    
       map.put(object1, object2);
       assertTrue(map.containsKey(object1));
       assertEquals(object2, map.get(object1));
     }
    

Local fix

  • Using the remove() method to remove the expired key from the map
    allows code to be written which works around the problem.
    

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    All users of App Connect Enterprise version 12 using MbLocalMap
    or MbGlobalMap in local mode.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    <span style="background-color:rgb(255, 255, 255)">When using the
    cache in local mode, if a key is re-used after expiring from a
    map then null is </span><span style="background-color:rgb(255,
    255, 255)">returned whenever that key is returned from the map,
    even if a new value is subsequently inserted. For </span><span
    style="background-color:rgb(255, 255, 255)">example, the
    following test fails:                             </span>
    
    @Test<span style="background-color:rgb(255, 255, 255)">
                                                             </span>
    <span style="background-color:rgb(255, 255, 255)">public void
    expiryTestWithReput() throws MbException {        </span>
    <span style="background-color:rgb(255, 255, 255)">   MbLocalMap
    map = new MbLocalMap();                          </span>
    <span style="background-color:rgb(255, 255, 255)">
    map.setTTL(1); //create entries that should already have
    </span>
    <span style="background-color:rgb(255, 255, 255)">expired
                                                           </span>
    <span style="background-color:rgb(255, 255, 255)">   Object
    object1 = new Object();                              </span>
    <span style="background-color:rgb(255, 255, 255)">   Object
    object2 = new Object();                              </span>
    <span style="background-color:rgb(255, 255, 255)">
    map.put(object1, object2);
    </span>
    <span style="background-color:rgb(255, 255, 255)">   try {
    Thread.sleep(1500); } catch(InterruptedException _ ) {</span>
    <span style="background-color:rgb(255, 255, 255)">}
    
    </span>
    <span style="background-color:rgb(255, 255, 255)">
    assertFalse(map.containsKey(object1));
    </span>
    <span style="background-color:rgb(255, 255, 255)">
    assertNull(map.get(object1));
    </span>
    <span style="background-color:rgb(255, 255, 255)">
    
    </span>
    <span style="background-color:rgb(255, 255, 255)">
    map.put(object1, object2);
    </span>
    <span style="background-color:rgb(255, 255, 255)">
    assertTrue(map.containsKey(object1));
    </span>
    <span style="background-color:rgb(255, 255, 255)">
    assertEquals(object2, map.get(object1));
    </span>
    <span style="background-color:rgb(255, 255, 255)">}      </span>
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IT41901

  • Reported component name

    APP CONNECT ENT

  • Reported component ID

    5724J0560

  • Reported release

    C00

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2022-08-31

  • Closed date

    2022-10-07

  • Last modified date

    2022-10-07

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

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

Fix information

  • Fixed component name

    APP CONNECT ENT

  • Fixed component ID

    5724J0560

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSDR5J","label":"IBM App Connect Enterprise"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C00","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
08 October 2022