Skip to content

Commit

Permalink
Experiment to determine if v1 = v2
Browse files Browse the repository at this point in the history
  • Loading branch information
klauswuestefeld committed Oct 10, 2024
1 parent 65e7dfa commit a2344fc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/prevayler_clj_aws/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,10 @@
(if (snapshot-exists? s3-cli bucket snapshot-path)
(let [v2-path (snapshot-v2-path snapshot-path)
snap1 (read-object s3-sdk-cli bucket snapshot-path unmarshal)]
(try
(if (snapshot-exists? s3-cli bucket v2-path)
(let [snap2 (read-object s3-sdk-cli bucket v2-path unmarshal-from-in)]
(println "Snapshot v1" (if (= snap1 snap2) "IS" "IS NOT") "equal to v2"))
(println v2-path "object not found in bucket."))
(catch Exception e
(.printStackTrace e)))
(if (snapshot-exists? s3-cli bucket v2-path)
(let [snap2 (read-object s3-sdk-cli bucket v2-path unmarshal-from-in)]
(throw (RuntimeException. (str "Snapshot v1" (if (= snap1 snap2) "IS" "IS NOT") "equal to v2"))))
(throw (RuntimeException. (str v2-path "object not found in bucket."))))
snap1)
{:partkey 0}))

Expand Down

0 comments on commit a2344fc

Please sign in to comment.