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

Ludovic Poitou
25.47.2011 ad1e1e776a8f5386df8237af2bc413446c4d8762
refs
author Ludovic Poitou <ludovic.poitou@forgerock.com>
Friday, February 25, 2011 19:47 +0100
committer Ludovic Poitou <ludovic.poitou@forgerock.com>
Friday, February 25, 2011 19:47 +0100
commitad1e1e776a8f5386df8237af2bc413446c4d8762
tree 051a7df5d10dd21daa591adb35dcc45d6e8e298c tree | zip | gz
parent f21e1eef7bec56d4d9b022359d8bf20c92012b94 view | diff
Fix for OPENDJ-55: Failing modify operations causing memory leak.
The memory leak is happening when PreOperation plugins are aborting an update (like UniqueAttributePlugin).
Several issues with the whole plugin manager, preOperation and postOperation plugins.
1/ The postOperation method of a plugin was always called even when the PreOp was skipped. This is due to an error in the ModifyOperationWrapper equals method (A.equals(A) was always false). As a result, the concurrentHashMap of skipped plugins was never cleaned and leaked memory big time.
2/ The postOperation method for most of the registered plugin would not check if the operation was successful or not before processing. This could possibly create issues with Access Controls, Groups or Subentries.
3/ The UniqueAttributePlugin would not clean the concurrentHashMap of attribute values being checked for uniqueness, on errors. On success, it's done in the PostOperation method. On errors, the PostOperation method is not called, so the PreOp needs to cleans it before returning. For this we're now keeping a list of values added to the ConcurrrentHashMap, and remove them before returning an error.
8 files modified
293 ■■■■ changed files
opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java 29 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/GroupManager.java 29 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/ModifyOperationWrapper.java 17 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/OperationWrapper.java 37 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/PluginConfigManager.java 50 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/SubentryManager.java 28 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/plugins/UniqueAttributePlugin.java 68 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/types/AbstractOperation.java 35 ●●●●● diff | view | raw | blame | history