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

matthew_swift
18.54.2010 9d12a3dacc94f69343093b4f398b93a83efbdc00
Make sure completed tasks retention limit is respected upon server restarts.
2 files modified
16 ■■■■■ changed files
opends/src/messages/messages/backend.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/task/TaskScheduler.java 14 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/backend.properties
@@ -410,6 +410,8 @@
 the same ID
SEVERE_ERR_TASKSCHED_DUPLICATE_TASK_ID_134=Unable to schedule task %s because \
 another task already exists with the same ID
MILD_WARN_TASKSCHED_DUPLICATE_TASK_ID_135=Unable to add completed task %s to \
 the task scheduler because another task already exists with the same ID
SEVERE_ERR_TASKSCHED_ERROR_SCHEDULING_RECURRING_ITERATION_136=An error \
 occurred while attempting to schedule the next iteration of recurring task \
 %s:  %s
opends/src/server/org/opends/server/backends/task/TaskScheduler.java
@@ -1170,7 +1170,19 @@
              Task task = entryToScheduledTask(entry, null);
              if (TaskState.isDone(task.getTaskState()))
              {
                completedTasks.add(task);
                String id = task.getTaskID();
                if (tasks.containsKey(id))
                {
                  Message message =
                      WARN_TASKSCHED_DUPLICATE_TASK_ID.get(
                      String.valueOf(id));
                  logError(message);
                }
                else
                {
                  completedTasks.add(task);
                  tasks.put(id, task);
                }
              }
              else
              {