Closed Bug 877884 Opened 12 years ago Closed 11 years ago

Table creation probably generates wrong primary key

Categories

(Cloud Services Graveyard :: Server: Sync, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: telliott, Assigned: rfkelly)

References

Details

(Whiteboard: [qa+])

Attachments

(2 files)

http://hg.mozilla.org/services/server-storage/file/cffa43a1ceea/syncstorage/storage/sqlmappers.py#l77 The table definition defines id, username and collection columns and designates them PK. However, the PK should be username, collection, id (since username, collection is a common query).
QA Contact: jbonacci
Whiteboard: [qa+]
Blocks: 907479
Priority: -- → P2
This is not a problem in current prod because ops create the tables by hand. But let's fix it in both places in case that situation changes in future.
Attachment #8388957 - Flags: review?(telliott)
Attachment #8388958 - Flags: review?(telliott)
Comment on attachment 8388958 [details] [diff] [review] sync1.5-bso-primary-key-order.diff Review of attachment 8388958 [details] [diff] [review]: ----------------------------------------------------------------- This, btw, is another reason I'm not a fan of ORMs :P
Attachment #8388958 - Flags: review?(telliott) → review+
Attachment #8388957 - Flags: review?(telliott) → review+
:rfkelly - I verified this in code, but what do we need to do to verify the following: "But let's fix it in both places in case that situation changes in future."
> "But let's fix it in both places in case that situation changes in future." Just make sure it's in both sync1.5 and sync1.1 codebases
Done.
Status: RESOLVED → VERIFIED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: