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

Ludovic Poitou
25.47.2011 4600e4528d8e1509408bbd192fd2c20f38cbf7be
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
commit4600e4528d8e1509408bbd192fd2c20f38cbf7be
tree 3dc059ad3544b8f9d76d7d9c194b0d7c2671bb35 tree | zip | gz
parent 6af1fd97c04624f72926749dedf07176a7c9e34a 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
opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java 29 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/GroupManager.java 29 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/ModifyOperationWrapper.java 17 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/OperationWrapper.java 37 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/PluginConfigManager.java 50 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/SubentryManager.java 28 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/plugins/UniqueAttributePlugin.java 68 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/types/AbstractOperation.java 35 ●●●●● diff | view | raw | blame | history