Issue Details (XML | Word | Printable)

Key: DIRSERVER-680
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Emmanuel Lecharny
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

NPE when using 0 size cache

Created: 22/Jul/06 12:26 PM   Updated: 29/Jul/06 11:54 PM
Return to search
Component/s: None
Affects Version/s: 1.0-RC3
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 29/Jul/06 11:54 PM


 Description  « Hide
When the cache properties are set to a null size (0), you get a NPE when launching the server. It seems that 1 is the minimum size for a MRU cache to be initialized.

Note that it makes no sense to create null sized caches, as it kills the performance (injecting 10 000 entries take around 3 hours :)

It was just done to check for memory leaks.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Lecharny added a comment - 29/Jul/06 11:54 PM
A efensive test has been added. If a null or negative cache size is used, then the default cache value is used (100)

Emmanuel Lecharny made changes - 29/Jul/06 11:54 PM
Field Original Value New Value
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]
Repository Revision Date User Message
ASF #426853 Sat Jul 29 23:55:44 UTC 2006 elecharny Added a protection against bad cache size ( negative or null cache size)
(this Fix DIRSERVER-680)
Files Changed
MODIFY /directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java