Skip to content

Commit

Permalink
Destination S3-V2: Maybe fix metadata issue
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-schmidt committed Jan 31, 2025
1 parent 1afc861 commit 2625d93
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class ObjectStorageDestinationState(
return client
.list(pathFactory.getLongestStreamConstantPrefix(stream, isStaging = false))
.filter { matcher.match(it.key) != null }
.toList() // Force the list call to complete before initiating metadata calls
.mapNotNull { obj ->
val generationId =
client.getMetadata(obj.key)[METADATA_GENERATION_ID_KEY]?.toLongOrNull() ?: 0L
Expand All @@ -65,7 +66,6 @@ class ObjectStorageDestinationState(
null
}
}
.toList()
}

/**
Expand Down

0 comments on commit 2625d93

Please sign in to comment.