Closed Bug 668573 Opened 14 years ago Closed 14 years ago

alter database schema to prevent NULL payload sizes

Categories

(Cloud Services :: Operations: Miscellaneous, task)

x86_64
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Atoll, Unassigned)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #667074 +++ We found out that some payload sizes are NULL in the stage DB, and that broke the get_sizes API. While it seemed to be an old problem (a new sync did not produce those) we will: 1/ control if prod has some 2/ handle those gracefully in the code 3/ avoid it in the future (telliott suggests to add a NOT NULL in the db)
Formerly a multibug, this is now item #3 from comment #0: In the future, prohibit sync code from storing NULL in the payload_size column.
Summary: Some payload_sizes are NULL → alter database schema to prevent NULL payload sizes
(In reply to comment #1) > Formerly a multibug, this is now item #3 from comment #0: > > In the future, prohibit sync code from storing NULL in the payload_size > column. If we're going to NOT NULL, make sure we default 0 as well.
Moving to Server: Sync. Toby, can you r? me when the schema change is ready?
Assignee: rsoderberg → nobody
Component: Operations → Server: Sync
QA Contact: operations → sync-server
I believe that the alter is simply: alter table wbo* change column payload_size payload_size int(11) NOT NULL DEFAULT 0;
Attachment #543203 - Flags: review?(tarek)
Attachment #543203 - Flags: feedback?(rsoderberg)
Comment on attachment 543203 [details] [diff] [review] adds a not null default 0 to the wbo tables Looks good
Attachment #543203 - Flags: review?(tarek) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Component: Server: Sync → Operations
Resolution: --- → FIXED
Attachment #543203 - Flags: feedback?(rsoderberg) → feedback+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: