Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsing node and fcr:content events to prevent duplicate messages #763

Closed
wants to merge 3 commits into from

Conversation

escowles
Copy link
Contributor

@escowles escowles commented Apr 3, 2015

Updating event machinery to collapse events about content nodes and the fcr:content property so adding/removing content only produces a single event

Fixes https://jira.duraspace.org/browse/FCREPO-1440

…he fcr:content property so adding/removing content only produces a single event
final String id = ev.getIdentifier();
// build id from nodepath+user to collapse multiple nodes from adding/removing content nodes
final String id = ev.getPath().replaceAll("/jcr:content/","/").replaceAll(propPattern,"")
+ "-" + ev.getUserID();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In doing some manual testing, it looks like NonRdfSources named "/book/ucsd:page" are being incorrectly sorted down to "/book".

The approach of tweaking the event path versus in this function which originally was designed to simply extract node identifiers makes me a little nervous.

Do we have an integration test that demonstrates the real issue that this PR is trying to resolve?

…g IT demonstrating only a single event is emitted when content node is added
@awoods
Copy link

awoods commented Apr 8, 2015

Resolved with: 3de050c

@awoods awoods closed this Apr 8, 2015
@escowles escowles deleted the event-file branch April 20, 2015 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants