Skip to content

Commit

Permalink
BUG 35028949 - [35023368->14.1.1.0.13] CQC clients deadlock between O… (
Browse files Browse the repository at this point in the history
#21)

* BUG 35028949 - [35023368->14.1.1.0.13] CQC clients deadlock between ObservableHashMap and ContinuousQueryCache.ensureSynchronized

[git-p4: depot-paths = "//dev/release.net/coherence-net-v14.1.1.0/": change = 98226]

* Update workflow to use Java 17

* Attempt to fix .net issue
  • Loading branch information
rlubke authored Apr 14, 2023
1 parent e4e4c46 commit 48ae33a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 16 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# Set up Java 11
- name: Set up Java 11
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'

# Set up Java 17
- name: Set up Java 17
uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '17'

# Install SSL certificates
- name: Install SSL certificates
Expand Down
36 changes: 23 additions & 13 deletions src/Coherence.Core/Net/Cache/ContinuousQueryCache.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* http://oss.oracle.com/licenses/upl.
* https://oss.oracle.com/licenses/upl.
*/
using System;
using System.Collections;
Expand Down Expand Up @@ -2557,11 +2557,18 @@ protected bool IsEventDeferred(object key)
{
if (State <= CacheState.Configuring)
{
// since the listeners are being configured and the local
// cache is being populated, assume that the event is
// being processed out-of-order and requires a subsequent
// synchronization of the corresponding value
cacheSyncReq[key] = null;
if (typeof(DeactivationListener).Name.Equals(key))
{
cacheSyncReq.Clear();
}
else
{
// since the listeners are being configured and the local
// cache is being populated, assume that the event is
// being processed out-of-order and requires a subsequent
// synchronization of the corresponding value
cacheSyncReq[key] = null;
}
isDeferred = true;
}
else
Expand Down Expand Up @@ -3056,13 +3063,16 @@ public override void EntryUpdated(CacheEventArgs evt)
// "truncate" event
ContinuousQueryCache queryCache = m_parentQueryCache;
IObservableCache internalCache = queryCache.InternalCache;
if (internalCache is LocalCache)
if (!queryCache.IsEventDeferred(typeof(DeactivationListener).Name))
{
((LocalCache) internalCache).Truncate();
}
else
{
internalCache.Clear();
if (internalCache is LocalCache)
{
((LocalCache) internalCache).Truncate();
}
else
{
internalCache.Clear();
}
}
}

Expand Down

0 comments on commit 48ae33a

Please sign in to comment.