HuaHuaY commented on code in PR #770:
URL: https://github.com/apache/iceberg-cpp/pull/770#discussion_r3464245203
##########
src/iceberg/update/snapshot_update.cc:
##########
@@ -419,8 +424,9 @@ std::string SnapshotUpdate::ManifestListPath() {
// Generate manifest list path
// Format: {metadata_location}/snap-{snapshot_id}-{attempt}-{uuid}.avro
int64_t snapshot_id = SnapshotId();
+ auto attempt = attempt_.fetch_add(1, std::memory_order_relaxed) + 1;
Review Comment:
These atomic variables do not depend on other atomic variables. Therefore,
there is no need to worry about memory ordering affecting instruction
reordering in a way that causes issues with execution timing.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]