Skip to content

Commit 90b8479

Browse files
committed
Bug 38122993 - [37850365->22.06.14] 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-v22.06/": change = 117132]
1 parent 32c556b commit 90b8479

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
@@ -23317,38 +23317,39 @@ public boolean isReadOnlyRequest()
2331723317
*/
2331823318
public Storage.EntryStatus[] lockEntries(Storage storage, com.tangosol.util.Binary[] aKeys, int cSize)
2331923319
{
23320-
// import com.tangosol.util.Binary;
23321-
// import com.tangosol.util.LiteMap;
23322-
// import java.util.Map;
23323-
23324-
Map mapStorage = getStorageStatusMap(); // <Storage, Map<BinKey, $EntryStatus>>
23325-
Map mapKeyStatus = (Map) mapStorage.get(storage);
23326-
PartitionedCache service = getService();
23320+
Map mapStorage = getStorageStatusMap(); // <Storage, Map<BinKey, $EntryStatus>>
23321+
Map mapKeyStatus = (Map) mapStorage.get(storage);
23322+
PartitionedCache service = getService();
2332723323
PartitionedCache.ResourceCoordinator coordinator = service.getResourceCoordinator();
23328-
Storage.EntryStatus[] aStatus = new Storage.EntryStatus[cSize];
23329-
23324+
List<Storage.EntryStatus> lStatus = new ArrayList<>();
23325+
2333023326
if (mapKeyStatus == null)
2333123327
{
2333223328
mapStorage.put(storage, mapKeyStatus = new LiteMap());
2333323329
}
23334-
23330+
2333523331
for (int i = 0; i < cSize; i++)
2333623332
{
2333723333
Binary binKey = aKeys[i];
2333823334

2333923335
service.lockKey(storage, binKey, false);
2334023336

2334123337
Storage.EntryStatus status = coordinator.getStatus(storage, binKey);
23342-
_assert(status != null && status.getBinaryEntry() == null);
23343-
23338+
if (status == null || status.getBinaryEntry() != null)
23339+
{
23340+
_trace("Status invalid while locking entry; skipping key", 1);
23341+
// skip, soft assert; this could happen during shutdown with concurrent requests
23342+
continue;
23343+
}
23344+
2334423345
mapKeyStatus.put(binKey, status);
2334523346

2334623347
status.setBinaryEntry(storage.instantiateBinaryEntry(binKey, null, false));
23347-
23348-
aStatus[i] = status;
23348+
23349+
lStatus.add(status);
2334923350
}
2335023351

23351-
return aStatus;
23352+
return lStatus.toArray(new Storage.EntryStatus[lStatus.size()]);
2335223353
}
2335323354

2335423355
/**

0 commit comments

Comments
 (0)