Skip to content

Commit 669e4ec

Browse files
committed
Enhancement Request 37422328 - Undo //dev/coherence-ce/release/coherence-ce-v24.09/prj/... changelist 113078
[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v24.09/": change = 113127]
1 parent e2d28f3 commit 669e4ec

File tree

6 files changed

+9
-702
lines changed

6 files changed

+9
-702
lines changed

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

Lines changed: 5 additions & 232 deletions
Original file line numberDiff line numberDiff line change
@@ -28251,19 +28251,6 @@ public static class SnapshotController
2825128251
*/
2825228252
private volatile long __m_SnapshotNamesExpire;
2825328253

28254-
/**
28255-
* A cache of failed snapshot names held for at most SNAPSHOT_NAMES_EXPIRE
28256-
* millis after a SnapshotListRequest.
28257-
*/
28258-
private String[] __m_SnapshotFailures;
28259-
28260-
/**
28261-
* An absolute time when SnapshotFailures should no longer be used.
28262-
*
28263-
* @volatile
28264-
*/
28265-
private volatile long __m_SnapshotFailuresExpire;
28266-
2826728254
/**
2826828255
* Property State
2826928256
*
@@ -28862,26 +28849,6 @@ protected long getSnapshotNamesExpire()
2886228849
return __m_SnapshotNamesExpire;
2886328850
}
2886428851

28865-
/**
28866-
* Getter for property SnapshotFailures.<p>
28867-
* A cache of snapshot names held for at most SNAPSHOT_NAMES_EXPIRE
28868-
* millis after a SnapshotListRequest.
28869-
*/
28870-
protected String[] getSnapshotFailures()
28871-
{
28872-
return __m_SnapshotFailures;
28873-
}
28874-
28875-
/**
28876-
* An absolute time when SnapshotFailures should no longer be used.
28877-
*
28878-
* @volatile
28879-
*/
28880-
protected long getSnapshotFailuresExpire()
28881-
{
28882-
return __m_SnapshotFailuresExpire;
28883-
}
28884-
2888528852
// From interface: com.tangosol.persistence.PersistenceManagerMBean
2888628853
/**
2888728854
* Return a list of snapshots that are available for recovery.
@@ -28921,41 +28888,6 @@ public String[] getSnapshots()
2892128888
return asNames;
2892228889
}
2892328890

28924-
/**
28925-
* Return the list of failed snapshots.
28926-
*
28927-
* @return the list of failed snapshots
28928-
*/
28929-
public String[] listFailedSnapshots()
28930-
{
28931-
PartitionedService service = getService();
28932-
if (service == null || !service.isRunning())
28933-
{
28934-
return null;
28935-
}
28936-
28937-
if (Base.getSafeTimeMillis() < getSnapshotFailuresExpire() ||
28938-
Thread.currentThread() == service.getThread())
28939-
{
28940-
// use the cached value if within the allowed staleness or if being asked
28941-
// on the service thread, as it requires a poll to all storage-enabled members.
28942-
// This question could only be asked meaningfully on the Management thread
28943-
// but could be called during serialization of the model for initial
28944-
// registration - see Registry.registerLocalModel()
28945-
return getSnapshotFailures();
28946-
}
28947-
28948-
PartitionedService.SnapshotListRequest msgRequest = (PartitionedService.SnapshotListRequest)
28949-
service.instantiateMessage("SnapshotListRequest");
28950-
msgRequest.setToMemberSet(service.getOwnershipMemberSet());
28951-
msgRequest.setSnapshotName(null);
28952-
msgRequest.setFailed(true); // this ensures we get list of failed snapshots
28953-
28954-
String[] asNames = (String[]) service.poll(msgRequest);
28955-
setSnapshotFailures(asNames);
28956-
return asNames;
28957-
}
28958-
2895928891
/**
2896028892
* Return a Map<Integer, String[]> where the key is the member id
2896128893
* and the value is the list of stores that are known by all members
@@ -29238,21 +29170,17 @@ public void onRecoveryCompleted(String sSnapshot, com.tangosol.net.partition.Par
2923829170

2923929171
String sMessage, sUserData;
2924029172

29241-
PersistenceEnvironment env = SafePersistenceWrappers.unwrap(
29242-
getService().getPersistenceControl().getPersistenceEnvironment());
2924329173
if (partsFailed == null || partsFailed.isEmpty())
2924429174
{
2924529175
sMessage = "Successfully recovered snapshot \"" + sSnapshot + '"';
2924629176
sUserData = "";
2924729177
_trace(sMessage, 3);
29248-
CachePersistenceHelper.recordRecoveryStatus(env, sSnapshot, true, null);
2924929178
}
2925029179
else
2925129180
{
2925229181
sMessage = "Failed to recover snapshot \"" + sSnapshot + '"';
2925329182
sUserData = "failed partitions " + partsFailed;
2925429183
_trace(sMessage + " because of " + sUserData, 2);
29255-
CachePersistenceHelper.recordRecoveryStatus(env, sSnapshot, false, sUserData);
2925629184
}
2925729185

2925829186
// resume the service if it was previously suspended
@@ -29505,48 +29433,6 @@ public void removeSnapshot(String sSnapshot)
2950529433
addNotification(PersistenceManagerMBean.REMOVE_SNAPSHOT_BEGIN, getOperationStatus(), "");
2950629434
}
2950729435

29508-
/**
29509-
* Return snapshot status.
29510-
*
29511-
* @param sName the snapshot name
29512-
*
29513-
* @return the snapshot status, or null if it is not possible
29514-
* to obtain the status.
29515-
*/
29516-
public synchronized String getSnapshotStatus(String sName)
29517-
{
29518-
String currentSnapshotName = getSnapshotName();
29519-
if (sName.equals(currentSnapshotName))
29520-
{
29521-
return getOperationStatus();
29522-
}
29523-
29524-
return CachePersistenceHelper.getSnapshotStatus(
29525-
SafePersistenceWrappers.unwrap(getService().getPersistenceControl().getPersistenceEnvironment()),
29526-
sName);
29527-
}
29528-
29529-
/**
29530-
* Return snapshot recovery status.
29531-
*
29532-
* @param sName the snapshot name
29533-
*
29534-
* @return the snapshot recovery status, or null if it is not
29535-
* possible to obtain the status.
29536-
*/
29537-
public synchronized String getSnapshotRecoveryStatus(String sName)
29538-
{
29539-
String currentSnapshotName = getSnapshotName();
29540-
if (sName.equals(currentSnapshotName))
29541-
{
29542-
return getOperationStatus();
29543-
}
29544-
29545-
return CachePersistenceHelper.getSnapshotRecoveryStatus(
29546-
SafePersistenceWrappers.unwrap(getService().getPersistenceControl().getPersistenceEnvironment()),
29547-
sName);
29548-
}
29549-
2955029436
/**
2955129437
* Reset the state of the SnapshotController after an operation has
2955229438
* completed.
@@ -29742,32 +29628,6 @@ protected void setSnapshotNamesExpire(long ldtExpire)
2974229628
{
2974329629
__m_SnapshotNamesExpire = ldtExpire;
2974429630
}
29745-
29746-
// Accessor for the property "SnapshotFailures"
29747-
/**
29748-
* Setter for property SnapshotFailures.<p>
29749-
* A cache of snapshot names held for at most SNAPSHOT_NAMES_EXPIRE
29750-
* millis after a SnapshotListRequest.
29751-
*/
29752-
public void setSnapshotFailures(String[] asNames)
29753-
{
29754-
// import com.tangosol.util.Base;
29755-
29756-
__m_SnapshotFailures = asNames;
29757-
29758-
setSnapshotFailuresExpire(asNames == null
29759-
? 0L : Base.getSafeTimeMillis() + SNAPSHOT_NAMES_EXPIRE);
29760-
}
29761-
29762-
/**
29763-
* An absolute time when SnapshotFailures should no longer be used.
29764-
*
29765-
* @volatile
29766-
*/
29767-
protected void setSnapshotFailuresExpire(long ldtExpire)
29768-
{
29769-
__m_SnapshotFailuresExpire = ldtExpire;
29770-
}
2977129631

2977229632
// Accessor for the property "State"
2977329633
/**
@@ -30960,26 +30820,15 @@ public static class SnapshotListRequest
3096030820
*/
3096130821
public static final String RESPONSE_STORES = "2";
3096230822

30963-
/**
30964-
* This value indicates the response was for a list of failed snapshots.
30965-
*/
30966-
public static final String RESPONSE_FAILED_SNAPSHOTS = "3";
30967-
3096830823
/**
3096930824
* Property SnapshotName
3097030825
*
3097130826
* If Snapshot is null this means that SnapshotListRequest should
30972-
* retrieve the snapshots for the service (or failed snapshots if
30973-
* __m_failed is set to true) otherwise the stores for the
30827+
* retrieve the snapshots for the service otherwise the stores for the
3097430828
* snapshot specified by SnapshotName should be returned.
3097530829
*/
3097630830
private String __m_SnapshotName;
3097730831
private static com.tangosol.util.ListMap __mapChildren;
30978-
30979-
/**
30980-
* If true request should retrieve list of failed snapshots.
30981-
*/
30982-
private boolean __m_failed;
3098330832

3098430833
// Static initializer
3098530834
static
@@ -31110,15 +30959,6 @@ public String getSnapshotName()
3111030959
return __m_SnapshotName;
3111130960
}
3111230961

31113-
/**
31114-
* Returns true if SnapshotListRequest should retrieve list
31115-
* of failed snapshots.
31116-
*/
31117-
public boolean getFailed()
31118-
{
31119-
return __m_failed;
31120-
}
31121-
3112230962
// Declared at the super level
3112330963
protected com.tangosol.coherence.component.net.Poll instantiatePoll()
3112430964
{
@@ -31170,16 +31010,8 @@ public void onReceived()
3117031010

3117131011
if (sSnapshotName == null)
3117231012
{
31173-
if (getFailed())
31174-
{
31175-
String[] asFailedSnapshots = CachePersistenceHelper.getFailedSnapshots(env);
31176-
msgResponse.setValue (new Object[] {RESPONSE_FAILED_SNAPSHOTS, asFailedSnapshots});
31177-
}
31178-
else
31179-
{
31180-
// respond with list of snapshots
31181-
msgResponse.setValue (new Object[] {RESPONSE_SNAPSHOTS, env.listSnapshots()});
31182-
}
31013+
// respond with list of snapshots
31014+
msgResponse.setValue (new Object[] {RESPONSE_SNAPSHOTS, env.listSnapshots()});
3118331015
}
3118431016
else
3118531017
{
@@ -31220,7 +31052,6 @@ public void read(com.tangosol.io.ReadBuffer.BufferInput input)
3122031052

3122131053
boolean fNull = input.readBoolean();
3122231054
setSnapshotName(fNull ? null : input.readUTF());
31223-
setFailed(fNull && input.readBoolean());
3122431055
}
3122531056

3122631057
// Accessor for the property "SnapshotName"
@@ -31235,15 +31066,6 @@ public void setSnapshotName(String sSnapshotName)
3123531066
__m_SnapshotName = sSnapshotName;
3123631067
}
3123731068

31238-
/**
31239-
* Set to true if SnapshotListRequest should retrieve list
31240-
* of failed snapshots.
31241-
*/
31242-
public void setFailed(boolean bFailed)
31243-
{
31244-
__m_failed = bFailed;
31245-
}
31246-
3124731069
// Declared at the super level
3124831070
public void write(com.tangosol.io.WriteBuffer.BufferOutput output)
3124931071
throws java.io.IOException
@@ -31256,10 +31078,6 @@ public void write(com.tangosol.io.WriteBuffer.BufferOutput output)
3125631078
{
3125731079
output.writeUTF(getSnapshotName());
3125831080
}
31259-
if (fNull)
31260-
{
31261-
output.writeBoolean(getFailed());
31262-
}
3126331081
}
3126431082

3126531083
// ---- class: com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService$SnapshotListRequest$Poll
@@ -31288,10 +31106,6 @@ public static class Poll
3128831106
*/
3128931107
private transient java.util.Set __m_Snapshots;
3129031108

31291-
/**
31292-
* The set of failed snapshot names returned by the SnapshotListRequests.
31293-
*/
31294-
private transient java.util.Set __m_FailedSnapshots;
3129531109
/**
3129631110
* Property Stores
3129731111
*
@@ -31391,15 +31205,6 @@ public java.util.Set getSnapshots()
3139131205
return __m_Snapshots;
3139231206
}
3139331207

31394-
/**
31395-
* The set of names of failed snapshots
31396-
* returned by the SnapshotListRequests.
31397-
*/
31398-
public java.util.Set getFailedSnapshots()
31399-
{
31400-
return __m_FailedSnapshots;
31401-
}
31402-
3140331208
// Accessor for the property "Stores"
3140431209
/**
3140531210
* Getter for property Stores.<p>
@@ -31424,18 +31229,13 @@ protected void onCompletion()
3142431229
// import java.util.Map;
3142531230
// import java.util.Set;
3142631231

31427-
Set setSnapshots = getSnapshots();
31428-
Set setFailedSnapshots = getFailedSnapshots();
31429-
Map mapStores = getStores();
31232+
Set setSnapshots = getSnapshots();
31233+
Map mapStores = getStores();
3143031234

3143131235
if (setSnapshots != null)
3143231236
{
3143331237
setResult(setSnapshots.toArray(new String[setSnapshots.size()]));
3143431238
}
31435-
else if (setFailedSnapshots != null)
31436-
{
31437-
setResult(setFailedSnapshots.toArray(new String[setFailedSnapshots.size()]));
31438-
}
3143931239
else
3144031240
{
3144131241
setResult(mapStores);
@@ -31480,25 +31280,6 @@ public void onResponse(com.tangosol.coherence.component.net.Message msg)
3148031280
setSnapshots.add(asSnapshots[i]);
3148131281
}
3148231282
}
31483-
else if (PartitionedService.SnapshotListRequest.RESPONSE_FAILED_SNAPSHOTS.equals(oResult[0]))
31484-
{
31485-
// list of snapshots was asked for
31486-
Set setFailedSnapshots = getFailedSnapshots();
31487-
if (setFailedSnapshots == null)
31488-
{
31489-
setFailedSnapshots = new TreeSet();
31490-
setFailedSnapshots(setFailedSnapshots);
31491-
}
31492-
31493-
Object[] asFailedSnapshots = (Object[]) oResult[1]; // logically String[] but POF widens it
31494-
if (asFailedSnapshots != null)
31495-
{
31496-
for (int i = 0, c = asFailedSnapshots.length; i < c; i++)
31497-
{
31498-
setFailedSnapshots.add(asFailedSnapshots[i]);
31499-
}
31500-
}
31501-
}
3150231283
else
3150331284
{
3150431285
// list of stores per snapshot was asked for from each member.
@@ -31536,14 +31317,6 @@ public void setSnapshots(java.util.Set setSnapshots)
3153631317
{
3153731318
__m_Snapshots = setSnapshots;
3153831319
}
31539-
31540-
/**
31541-
* Set the names of failed snapshots returned by the SnapshotListRequests.
31542-
*/
31543-
public void setFailedSnapshots(java.util.Set setFailedSnapshots)
31544-
{
31545-
__m_FailedSnapshots = setFailedSnapshots;
31546-
}
3154731320

3154831321
// Accessor for the property "Stores"
3154931322
/**

0 commit comments

Comments
 (0)