mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
09.58.2007 37057adc0f58b9d747ba3834180ce06d582e3f14
- [Issue 1768] Invalid fallback behavior for FS Entry Cache
- [Issue 1767] Checksum error message on startup
- Set eol-style to native
4 files modified
72 ■■■■ changed files
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java 6 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java 25 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/ExtensionsMessages.java 31 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/messages/JebMessages.java 10 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -238,12 +238,6 @@
      }
    }
    // Log a warning that we have failed to checksum this db environment.
    int msgID = MSGID_JEB_BACKEND_CHECKSUM_FAIL;
    String message = getMessage(msgID, cfg.getBackendId());
    logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_WARNING,
        message, msgID);
    return 0;
  }
opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java
@@ -305,27 +305,14 @@
      // Log an error message.
      logError(ErrorLogCategory.CONFIGURATION,
          ErrorLogSeverity.SEVERE_ERROR,
          MSGID_FSCACHE_INVALID_HOME,
          String.valueOf(configEntryDN), stackTraceToSingleLineString(e),
          cacheHome, DEFAULT_FSCACHE_HOME);
          MSGID_FSCACHE_HOMELESS,
          String.valueOf(configEntryDN), stackTraceToSingleLineString(e));
      // User specified home is no good, reset to default.
      cacheHome = DEFAULT_FSCACHE_HOME;
      // Try again.
      try {
        checkAndSetupCacheHome(cacheHome);
      } catch (Exception e2) {
        // Not having any home for the cache db environment at this point is a
      // Not having any home directory for the cache db environment is a
        // fatal error as we are unable to continue any further without it.
        if (debugEnabled()) {
          TRACER.debugCaught(DebugLogLevel.ERROR, e2);
        }
        int msgID = MSGID_FSCACHE_HOMELESS;
        String message = getMessage(msgID, stackTraceToSingleLineString(e2));
        throw new InitializationException(msgID, message, e2);
      }
      String message = getMessage(msgID, stackTraceToSingleLineString(e));
      throw new InitializationException(msgID, message, e);
    }
    // Open JE environment and cache database.
@@ -2268,7 +2255,7 @@
            throw new Exception();
          }
        } catch(Exception e) {
          // Log an warning that the permissions were not set.
          // Log a warning that the permissions were not set.
          int msgID = MSGID_FSCACHE_SET_PERMISSIONS_FAILED;
          String message = getMessage(msgID, cacheHome);
          logError(ErrorLogCategory.EXTENSIONS, ErrorLogSeverity.SEVERE_WARNING,
opends/src/server/org/opends/server/messages/ExtensionsMessages.java
@@ -5142,29 +5142,19 @@
      CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_ERROR | 492;
  /**
   * The message ID for the message that will be used if entry cache home
   * either cannot be created or exist but already in use by another instance
   * This takes four arguments, which are the DN of the configuration entry,
   * the cache-home attribute value of the configuration entry, default cache
   * home value and a string representation of the exception that was caught.
   */
  public static final int MSGID_FSCACHE_INVALID_HOME =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_ERROR | 493;
  /**
   * The message ID for the message that will be used if a fatal error occurs
   * while trying to setup the cache db environment home.  This takes one
   * argument which is a string representation of the exception that was caught.
   */
  public static final int MSGID_FSCACHE_HOMELESS =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_FATAL_ERROR | 494;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_FATAL_ERROR | 493;
  /**
   * The message ID of an error indicating that the file permissions for the
   * file system entry cache database directory were not set.
   */
  public static final int MSGID_FSCACHE_SET_PERMISSIONS_FAILED =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_WARNING | 495;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_WARNING | 494;
  /**
   * The message ID for the message that will be used if recorded offline state
@@ -5172,7 +5162,7 @@
   * argument which is the backend ID.
   */
  public static final int MSGID_FSCACHE_OFFLINE_STATE_FAIL =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_WARNING | 496;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_WARNING | 495;
  /**
   * The message ID for the message that will be used to report the cache
@@ -5181,7 +5171,7 @@
   * restored.
   */
  public static final int MSGID_FSCACHE_RESTORE_PROGRESS_REPORT =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_INFORMATIONAL | 497;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_INFORMATIONAL | 496;
  /**
   * The message ID for the message that will be used to report the cache
@@ -5190,7 +5180,7 @@
   * preserved.
   */
  public static final int MSGID_FSCACHE_SAVE_PROGRESS_REPORT =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_INFORMATIONAL | 498;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_INFORMATIONAL | 497;
  /**
   * The message ID for the message that will be used if an error occurs while
@@ -5198,7 +5188,7 @@
   * cache. Takes no arguments.
   */
  public static final int MSGID_FSCACHE_INDEX_NOT_FOUND =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_INFORMATIONAL | 499;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_INFORMATIONAL | 498;
  /**
   * The message ID for the message that will be used if persistent cache index
@@ -5206,7 +5196,7 @@
   * can detect. Takes no arguments.
   */
  public static final int MSGID_FSCACHE_INDEX_IMPAIRED =
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_ERROR | 500;
       CATEGORY_MASK_EXTENSIONS | SEVERITY_MASK_SEVERE_ERROR | 499;
@@ -7461,15 +7451,10 @@
    registerMessage(MSGID_FSCACHE_CANNOT_INITIALIZE,
                    "A fatal error occurred while trying to initialize file " +
                    "system entry cache. This cache will be disabled now");
    registerMessage(MSGID_FSCACHE_INVALID_HOME,
                    "The file system entry cache home specified in entry %s " +
                    "is invalid:  %s.  The configured location of %s cannot " +
                    "be used so the server will attempt to use the default " +
                    "location of %s");
    registerMessage(MSGID_FSCACHE_HOMELESS,
                    "A fatal error occurred while trying to setup file " +
                    "system entry cache home. No suitable path can be found " +
                    "to host the cache home. This cache will be disabled now");
                    "to host the cache home");
    registerMessage(MSGID_FSCACHE_SET_PERMISSIONS_FAILED,
                    "Unable to set file permissions for the file system " +
                    "entry cache backend database directory %s");
opends/src/server/org/opends/server/messages/JebMessages.java
@@ -1157,13 +1157,6 @@
  public static final int MSGID_JEB_UNABLE_SET_PERMISSIONS =
      CATEGORY_MASK_JEB | SEVERITY_MASK_SEVERE_WARNING | 146;
  /**
   * The message ID to use when we have failed to checksum db environment.
   * This takes one argument which is the backend ID.
   */
  public static final int MSGID_JEB_BACKEND_CHECKSUM_FAIL =
      CATEGORY_MASK_JEB | SEVERITY_MASK_SEVERE_WARNING | 147;
  /**
   * Associates a set of generic messages with the message IDs defined in this
@@ -1474,9 +1467,6 @@
    registerMessage(MSGID_JEB_REBUILD_BACKEND_ONLINE,
                    "Rebuilding system index(es) must be done with the " +
                    "backend containing the base DN disabled");
    registerMessage(MSGID_JEB_BACKEND_CHECKSUM_FAIL,
                    "Failed to checksum the database environment for " +
                    "backend %s");
    registerMessage(MSGID_ENTRYIDSORTER_CANNOT_EXAMINE_ENTRY,
                    "Unable to examine the entry with ID %s for sorting " +
                    "purposes:  %s");