Skip to content

Commit 3b3e67a

Browse files
committed
Bug 38122994 - [37850365->25.03.3] Assertion failed at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvocationContext.lockEntries
[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v25.03/": change = 117131]
1 parent 5a5e609 commit 3b3e67a

File tree

1 file changed

+16
-15
lines changed
  • prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/util/daemon/queueProcessor/service/grid/partitionedService

1 file changed

+16
-15
lines changed

prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/util/daemon/queueProcessor/service/grid/partitionedService/PartitionedCache.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23346,38 +23346,39 @@ public boolean isReadOnlyRequest()
2334623346
*/
2334723347
public Storage.EntryStatus[] lockEntries(Storage storage, com.tangosol.util.Binary[] aKeys, int cSize)
2334823348
{
23349-
// import com.tangosol.util.Binary;
23350-
// import com.tangosol.util.LiteMap;
23351-
// import java.util.Map;
23352-
23353-
Map mapStorage = getStorageStatusMap(); // <Storage, Map<BinKey, $EntryStatus>>
23354-
Map mapKeyStatus = (Map) mapStorage.get(storage);
23355-
PartitionedCache service = getService();
23349+
Map mapStorage = getStorageStatusMap(); // <Storage, Map<BinKey, $EntryStatus>>
23350+
Map mapKeyStatus = (Map) mapStorage.get(storage);
23351+
PartitionedCache service = getService();
2335623352
PartitionedCache.ResourceCoordinator coordinator = service.getResourceCoordinator();
23357-
Storage.EntryStatus[] aStatus = new Storage.EntryStatus[cSize];
23358-
23353+
List<Storage.EntryStatus> lStatus = new ArrayList<>();
23354+
2335923355
if (mapKeyStatus == null)
2336023356
{
2336123357
mapStorage.put(storage, mapKeyStatus = new LiteMap());
2336223358
}
23363-
23359+
2336423360
for (int i = 0; i < cSize; i++)
2336523361
{
2336623362
Binary binKey = aKeys[i];
2336723363

2336823364
service.lockKey(storage, binKey, false);
2336923365

2337023366
Storage.EntryStatus status = coordinator.getStatus(storage, binKey);
23371-
_assert(status != null && status.getBinaryEntry() == null);
23372-
23367+
if (status == null || status.getBinaryEntry() != null)
23368+
{
23369+
_trace("Status invalid while locking entry; skipping key", 1);
23370+
// skip, soft assert; this could happen during shutdown with concurrent requests
23371+
continue;
23372+
}
23373+
2337323374
mapKeyStatus.put(binKey, status);
2337423375

2337523376
status.setBinaryEntry(storage.instantiateBinaryEntry(binKey, null, false));
23376-
23377-
aStatus[i] = status;
23377+
23378+
lStatus.add(status);
2337823379
}
2337923380

23380-
return aStatus;
23381+
return lStatus.toArray(new Storage.EntryStatus[lStatus.size()]);
2338123382
}
2338223383

2338323384
/**

0 commit comments

Comments
 (0)