exceptionfactory commented on code in PR #6460:
URL: https://github.com/apache/nifi/pull/6460#discussion_r1003429425
##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/gridfs/PutGridFS.java:
##########
@@ -212,9 +267,10 @@ private boolean canUploadFile(ProcessContext context,
FlowFile input, String buc
Document query;
if (uniqueness.equals(UNIQUE_BOTH.getValue())) {
- query = new Document().append("filename",
fileName).append("md5", hash);
+ query = new Document().append("filename", fileName)
+ .append("metadata", new Document(hashMetadataName,
hash));
} else if (uniqueness.equals(UNIQUE_HASH.getValue())) {
- query = new Document().append("md5", hash);
+ query = new Document().append("metadata", new
Document(hashMetadataName, hash));
Review Comment:
Given the potential complication, it seems better to focus this PR on the
integration testing against current MongoDB versions, and then address the
hashing change separately, which could include adjusting the integration tests
to cover both scenarios.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]