Closed Bug 1952407 Opened 11 days ago Closed 4 days ago

UNIQUE constraint failed due to geonames insert

Categories

(Application Services :: Suggest, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adw, Assigned: adw)

References

Details

(Whiteboard: [sng])

Attachments

(1 file)

This is logged several times when running test_quicksuggest_yelp_ml.js:

[ERROR error_support::handling] suggest-unexpected: Error executing SQL: UNIQUE constraint failed: geonames.id (context: geoname insert)
console.error: URLBar - QuickSuggest.SuggestBackendRust: "Ingest error" ({type:"Weather", error:(new Error("reason: Error executing SQL: UNIQUE constraint failed: geonames.id (context: geoname insert)", "resource://gre/modules/RustSuggest.sys.mjs", 2466)), reason:"Error executing SQL: UNIQUE constraint failed: geonames.id (context: geoname insert)"})

It's because geoname IDs are a stable part of the geonames data -- they aren't just an int in the Sqlite table that's incremented on insert -- and GeonameInsertStatement doesn't handle inserting a geoname with an existing ID, i.e., the same geoname again.

We've changed geonames once or twice so it's entirely possible this has prevented those changes from being ingested, although it hasn't been noticeable and geonames are recognized correctly in queries. And I'm not sure if we keep trying to ingest them every ingest period due to the failure.

It's also possible this prevents other RS data ingested at the same time as geonames from being ingested properly.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Whiteboard: [sng]
Status: ASSIGNED → RESOLVED
Closed: 4 days ago
Flags: qe-verify+
Resolution: --- → FIXED
See Also: → 1953945
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: