PX4 / flight_review

web application for flight log analysis & review
https://logs.px4.io/
BSD 3-Clause "New" or "Revised" License
193 stars 190 forks source link

Generate log UUIDs from file instead of randomly. #272

Closed df8s7d9g8s closed 6 months ago

df8s7d9g8s commented 7 months ago

Is there a reason why uuids are generated with uuid.uuid4() instead of something like uuid.uuid3(uuid.NAMESPACE_DNS, str(open(filename, "rb")))?

Would prevent getting multiple URLs and database entries when uploading the same log file and redirecting us to the existing log which is how I expected it to behave.

bkueng commented 7 months ago

I considered that at some point, but never looked into it. My main concern is hash collisions (and potentially somewhat higher resource usage). I'm not against it but overall I don't think it's worth doing the change for a few duplicates.

df8s7d9g8s commented 6 months ago

Don't know how it is for larger instances like review.px4, but at least for the one I host for my organization I keep having people upload the same log repeatedly instead of making public reports and using them, so I thought it would be a general concern more than a "few duplicates".