You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "exceptionfactory (via GitHub)" <gi...@apache.org> on 2023/08/28 22:05:45 UTC
[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7610: NIFI-11947 Updated Create Flow Version API to preserve timestamp when preserveS…
exceptionfactory commented on code in PR #7610:
URL: https://github.com/apache/nifi/pull/7610#discussion_r1308004635
##########
nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/service/RegistryService.java:
##########
@@ -539,19 +539,23 @@ public VersionedFlow deleteFlow(final String bucketIdentifier, final String flow
// ---------------------- VersionedFlowSnapshot methods ---------------------------------------------
public VersionedFlowSnapshot createFlowSnapshot(final VersionedFlowSnapshot flowSnapshot) {
+ return createFlowSnapshot(flowSnapshot,false);
+ }
+ public VersionedFlowSnapshot createFlowSnapshot(final VersionedFlowSnapshot flowSnapshot, final boolean preserveSourceProperties) {
if (flowSnapshot == null) {
throw new IllegalArgumentException("Versioned flow snapshot cannot be null");
}
// validation will ensure that the metadata and contents are not null
- if (flowSnapshot.getSnapshotMetadata() != null) {
+ if (flowSnapshot.getSnapshotMetadata() != null && !preserveSourceProperties ) {
Review Comment:
Similar to the approach in #7604, it looks like this method could be modified to check for a timestamp value already specified in the calling method. That would avoid having to pass down the `preserveSourceProperties` argument to this level.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org