Skip to content

Commit 97b3786

Browse files
rlubkelsho
authored andcommitted
COH-25531 - Port COH-24968 - RFA: Exception occurred while encoding a AggregateAllRequest results in total disconnect for client to .net
[git-p4: depot-paths = "//dev/main.net/": change = 92662]
1 parent db368b4 commit 97b3786

File tree

3 files changed

+69
-7
lines changed

3 files changed

+69
-7
lines changed

src/Coherence.Core/Net/Messaging/Impl/NamedCache/NamedCacheFactory.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
using System;
88

@@ -75,6 +75,7 @@ public NamedCacheFactory()
7575
/// </summary>
7676
private Type[] messagingTypes = { typeof(AggregateAllRequest),
7777
typeof(AggregateFilterRequest),
78+
typeof(CacheEvent),
7879
typeof(ClearRequest),
7980
typeof(ContainsAllRequest),
8081
typeof(ContainsKeyRequest),
@@ -88,15 +89,15 @@ public NamedCacheFactory()
8889
typeof(ListenerFilterRequest),
8990
typeof(ListenerKeyRequest),
9091
typeof(LockRequest),
91-
typeof(CacheEvent),
9292
typeof(NamedCachePartialResponse),
93+
typeof(NamedCacheResponse),
94+
typeof(NoStorageMembers),
9395
typeof(PutAllRequest),
9496
typeof(PutRequest),
9597
typeof(QueryRequest),
9698
typeof(RemoveAllRequest),
9799
typeof(RemoveRequest),
98100
typeof(SizeRequest),
99-
typeof(UnlockRequest),
100-
typeof(NamedCacheResponse) };
101+
typeof(UnlockRequest) };
101102
}
102103
}

src/Coherence.Core/Net/Messaging/Impl/NamedCache/NamedCacheProtocol.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
namespace Tangosol.Net.Messaging.Impl.NamedCache
88
{
@@ -49,7 +49,7 @@ public static NamedCacheProtocol Instance
4949
/// </summary>
5050
protected NamedCacheProtocol()
5151
{
52-
CurrentVersion = 9;
52+
CurrentVersion = 10;
5353
SupportedVersion = 2;
5454
}
5555

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright (c) 2022, Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Universal Permissive License v 1.0 as shown at
5+
* https://oss.oracle.com/licenses/upl.
6+
*/
7+
using Tangosol.Net.Cache;
8+
using Tangosol.Net.Cache.Support;
9+
using Tangosol.Net.Impl;
10+
using Tangosol.Util;
11+
12+
namespace Tangosol.Net.Messaging.Impl.NamedCache
13+
{
14+
/// <summary>
15+
/// Message indicating no storage members are available to
16+
/// service a request.
17+
/// </summary>
18+
/// <author>rl 2022.05.13</author>
19+
/// <seealso cref="NamedCacheRequest"/>
20+
/// <seealso cref="NamedCacheProtocol"/>
21+
public class NoStorageMembers : NamedCacheRequest
22+
{
23+
#region Properties
24+
25+
/// <inheritdoc />
26+
public override int TypeId
27+
{
28+
get { return TYPE_ID; }
29+
}
30+
31+
#endregion
32+
33+
#region Extend Overrides
34+
35+
/// <inheritdoc />
36+
protected override void OnRun(Response response)
37+
{
38+
IChannel channel = Channel;
39+
RemoteNamedCache cache = (RemoteNamedCache) channel.Receiver;
40+
Listeners listeners = cache.DeactivationListeners;
41+
42+
if (!listeners.IsEmpty)
43+
{
44+
CacheEventArgs evtDeleted = new CacheEventArgs(cache, CacheEventType.Deleted,
45+
null, null, null, false);
46+
RunnableCacheEvent.DispatchSafe(evtDeleted, listeners, null /*Queue*/);
47+
}
48+
}
49+
50+
#endregion
51+
52+
#region Data members
53+
54+
/// <summary>
55+
/// The type identifier for this Message class.
56+
/// </summary>
57+
public const int TYPE_ID = 56;
58+
59+
#endregion
60+
}
61+
}

0 commit comments

Comments
 (0)