jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1517850 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/RefreshManager.java
Date Tue, 27 Aug 2013 15:34:43 GMT
Author: mduerig
Date: Tue Aug 27 15:34:43 2013
New Revision: 1517850

URL: http://svn.apache.org/r1517850
Log:
OAK-960 Enable session refresh state coordination between multiple session in single thread
- Don't issue an "old session warning" when an in thread session synchronisation is pending
- Add TODOs and issue references

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/RefreshManager.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/RefreshManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/RefreshManager.java?rev=1517850&r1=1517849&r2=1517850&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/RefreshManager.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/RefreshManager.java
Tue Aug 27 15:34:43 2013
@@ -37,6 +37,8 @@ import org.apache.jackrabbit.oak.jcr.ope
  *     <li>an updated occurred through a different session from <em>within the
same
  *         thread.</em></li>
  * </ul>
+ * TODO: refactor this using the strategy pattern composing the different refresh behaviours.
+ * See OAK-960
  */
 public class RefreshManager {
     private final Exception initStackTrace = new Exception("The session was created here:");
@@ -81,8 +83,9 @@ public class RefreshManager {
         // Don't refresh if this operation is a refresh operation itself or
         // a save operation, which does an implicit refresh
         if (!sessionOperation.isRefresh() && !sessionOperation.isSave()) {
-            if (warnIfIdle && !refreshAtNextAccess
+            if (warnIfIdle && !refreshAtNextAccess && !hasInThreadCommit()
                     && timeElapsed > MILLISECONDS.convert(1, MINUTES)) {
+                // TODO replace logging with JMX monitoring. See OAK-941
                 // Warn once if this session has been idle too long
                 SessionDelegate.log.warn("This session has been idle for " + MINUTES.convert(timeElapsed,
MILLISECONDS) +
                         " minutes and might be out of date. Consider using a fresh session
or explicitly" +



Mime
View raw message