Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 219082 Details for
Bug 385794
Backport to 3.2.x [dstore] DataStore spirit mechanism and other memory improvements needed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
backport patch
patch.txt (text/plain), 7.16 KB, created by
David McKnight
on 2012-07-23 17:46:31 EDT
(
hide
)
Description:
backport patch
Filename:
MIME Type:
Creator:
David McKnight
Created:
2012-07-23 17:46:31 EDT
Size:
7.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.dstore.core >Index: src/org/eclipse/dstore/core/model/DataElement.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataElement.java,v >retrieving revision 1.18.2.2 >diff -u -r1.18.2.2 DataElement.java >--- src/org/eclipse/dstore/core/model/DataElement.java 22 May 2012 14:22:44 -0000 1.18.2.2 >+++ src/org/eclipse/dstore/core/model/DataElement.java 23 Jul 2012 21:46:13 -0000 >@@ -15,6 +15,7 @@ > * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed > * David McKnight (IBM) - [373507] [dstore][multithread] reduce heap memory on disconnect for server > * David McKnight (IBM) - [380158] [dstore] DataStore.command() fails when multiple commands issue simultaneously >+ * David McKnight (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed > *******************************************************************************/ > > package org.eclipse.dstore.core.model; >@@ -1627,11 +1628,7 @@ > { > for (int i = 0; i < _attributes.length; i++) > { >- String att = _attributes[i]; >- if (att != null) >- { >- att = null; >- } >+ _attributes[i] = null; > } > > } >Index: src/org/eclipse/dstore/core/model/DataStore.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/DataStore.java,v >retrieving revision 1.51.2.8 >diff -u -r1.51.2.8 DataStore.java >--- src/org/eclipse/dstore/core/model/DataStore.java 16 Jul 2012 20:45:06 -0000 1.51.2.8 >+++ src/org/eclipse/dstore/core/model/DataStore.java 23 Jul 2012 21:46:15 -0000 >@@ -41,6 +41,7 @@ > * David McKnight (IBM) - [370260] [dstore] log the RSE version in server traces > * David McKnight (IBM) - [373507] [dstore][multithread] reduce heap memory on disconnect for server > * David McKnight (IBM) - [385097] [dstore] DataStore spirit mechanism is not enabled >+ * David McKnight (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed > *******************************************************************************/ > > package org.eclipse.dstore.core.model; >@@ -2871,7 +2872,7 @@ > return results; > } > >- if (root.isDeleted()) >+ if (root.isDeleted() && !results.contains(root)) > { > results.add(root); > } >@@ -2890,7 +2891,6 @@ > { > if (child.isDeleted() && !results.contains(child)) > { >- > results.add(child); > if (!child.isReference()) > { >Index: src/org/eclipse/dstore/core/model/UpdateHandler.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/model/UpdateHandler.java,v >retrieving revision 1.14 >diff -u -r1.14 UpdateHandler.java >--- src/org/eclipse/dstore/core/model/UpdateHandler.java 19 May 2008 19:28:25 -0000 1.14 >+++ src/org/eclipse/dstore/core/model/UpdateHandler.java 23 Jul 2012 21:46:15 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2008 IBM Corporation and others. >+ * Copyright (c) 2002, 212 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -14,6 +14,7 @@ > * Contributors: > * David McKnight (IBM) [202822] should not be synchronizing on clean method > * David McKnight (IBM) - [226561] [apidoc] Add API markup to RSE Javadocs where extend / implement is allowed >+ * David McKnight (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed > *******************************************************************************/ > > package org.eclipse.dstore.core.model; >@@ -88,13 +89,17 @@ > > cleanChildren(child); // clean the children > >+ boolean virtual = _dataStore.isVirtual(); > if (child.isSpirit()) > { >- // officially delete this now >- child.delete(); >+ if (!virtual){ // leave the client copy >+ // officially delete this now >+ child.delete(); >+ } >+ } >+ if (!virtual || !child.isSpirit()){ // leave the client attributes if spirited >+ child.clear(); > } >- child.clear(); >- > if (parent != null) > { > synchronized (parent) >Index: src/org/eclipse/dstore/core/server/ServerReceiver.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.dstore.core/src/org/eclipse/dstore/core/server/ServerReceiver.java,v >retrieving revision 1.12 >diff -u -r1.12 ServerReceiver.java >--- src/org/eclipse/dstore/core/server/ServerReceiver.java 22 May 2010 10:52:37 -0000 1.12 >+++ src/org/eclipse/dstore/core/server/ServerReceiver.java 23 Jul 2012 21:46:15 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2009 IBM Corporation and others. >+ * Copyright (c) 2002, 2012 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -18,12 +18,14 @@ > * Noriaki Takatsu (IBM) - [257666] [multithread] TCP/IP socket connection is not closed > * David McKnight (IBM) - [257666] modified original patch to simplify > * Noriaki Takatsu (IBM) - [283656] [dstore][multithread] Serviceability issue >+ * David McKnight (IBM) - [385793] [dstore] DataStore spirit mechanism and other memory improvements needed > *******************************************************************************/ > > package org.eclipse.dstore.core.server; > > import java.io.IOException; > import java.net.Socket; >+import java.util.List; > > import org.eclipse.dstore.core.model.DataElement; > import org.eclipse.dstore.core.util.Receiver; >@@ -37,9 +39,12 @@ > */ > public class ServerReceiver extends Receiver > { >- >+ private DataElement _log; >+ private int _maxLog = 20; >+ private int _logIndex = 0; >+ > private ConnectionEstablisher _connection; >- >+ > /** > * Constructor > * >@@ -66,9 +71,26 @@ > { > DataElement rootOutput = documentObject.get(a); > >- DataElement log = _dataStore.getLogRoot(); >- log.addNestedData(rootOutput, false); >- >+ // max log >+ List logged = _log.getNestedData(); >+ if (logged == null){ >+ _log.addNestedData(rootOutput, false); >+ _logIndex++; >+ } >+ else { >+ if (_logIndex > _maxLog){ >+ _logIndex = 0; // reset logindex >+ } >+ >+ if (logged.size() > _logIndex){ >+ logged.set(_logIndex, rootOutput); >+ } >+ else { >+ logged.add(_logIndex, rootOutput); >+ } >+ _logIndex++; >+ } >+ > if (rootOutput.getName().equals("C_EXIT")) //$NON-NLS-1$ > { > finish();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 385794
: 219082 |
220706