spring-projects / spring-projects/spring-ldap
Data loss when update() results in NameAlreadyBoundException
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 375
- Forks
- 501
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 63
Description
I'm attempting to rename an entry as part of the LdapTemplate.update() call. That method includes support for this: it checks if the ID has changed, and will call an unbind() and rebind() if necessary to handle the rename.
The issue occurs when the new ID is already in use: we get the expected NameAlreadyBoundException, but the entry has now ceased to exist. Since unbind() has been called, but bind() fails, the entry is gone.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LdapTemplate.update() and trace the unbind() and rebind() calls used when an entry ID changes. Reproduce a rename to an already-used ID and verify that NameAlreadyBoundException does not remove the original entry; the existing entry should remain available after the failed update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100