mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-25 17:16:00 +03:00
[GH-ISSUE #1188] Bug: Adding two different links with the same timestamp (e.g. from JSON) errors out and stops the entire import #2246
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#2246
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @melyux on GitHub (Jul 22, 2023).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1188
Describe the bug
If you have two links with the same timestamp, ArchiveBox throws this error:
and stops the import. If the links don't match, it should just make separate records, not stop the entire import process. I see that the directories for these two snapshots are created in a way that resolves this (increments the timestamp for the "duplicate" snapshot's directory by 1, so we get
1611619200.0and1611619201.0. That's goodSteps to reproduce
AssertionError: Cannot merge two links with different URLs.Screenshots or log output
Source:
Log:
ArchiveBox version
@neel-suthar commented on GitHub (Jan 20, 2024):
@pirate Is this because we use the timestamp value to create the output directory?
@pirate commented on GitHub (Jan 20, 2024):
Yes, timestamp is currently the unique key for snapshots, because it has millisecond-level resolution we can always bump it by a few ms if there are conflicts (and even add more decimals). Resolving conflicts here and deduping correctly has historically been a big source of complexity in the archivebox internals.
This will change in the future when we add official support for taking multiple snapshots of the same url over time https://github.com/ArchiveBox/ArchiveBox/issues/179 and when we switch to using UUIDs for unique keys https://github.com/ArchiveBox/ArchiveBox/issues/74
@pirate commented on GitHub (Jan 8, 2026):
should be fixed on
dev, timestamp is no longer the unique key, now snapshots are just organized by uuid.dev isn't stable yet so dont upgrade big existing collections, but stay tuned for next release eventually.