-
Notifications
You must be signed in to change notification settings - Fork 8
Fix 462 #463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 462 #463
Changes from all commits
13bdbc0
bbadadd
784ef41
3d8890b
56b5fc1
104f49e
08fc85b
db74fc0
0680f36
83263ba
5474008
ce02a82
13e65da
e5a7b7b
3a30ad2
7216f31
6a68f18
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,6 +85,13 @@ RETURNS bool AS $$ | |
| SELECT $1.state = 'completed' | ||
| $$ STABLE LANGUAGE SQL; | ||
|
|
||
| -- Describe the state of the upload of the clks to the entity-service. | ||
| CREATE TYPE UPLOADEDSTATE AS ENUM ( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wow, now we have
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was indeed a pickle. I will add comments on the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll finally keep |
||
| 'not_started', -- default state, a dataprovider has not tried yet to upload her clks | ||
| 'in_progress', -- the upload is in progress, so no-one else should be able to upload at the same time | ||
| 'done', -- the clks have been uploaded, it should stay this way | ||
| 'error' -- the dataprovider has tried to upload the clks but an error occurred, having this state allows a dataprovider to try again. | ||
| ); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice |
||
|
|
||
| CREATE TABLE dataproviders ( | ||
| id SERIAL PRIMARY KEY, | ||
|
|
@@ -93,18 +100,19 @@ CREATE TABLE dataproviders ( | |
| token CHAR(48) NOT NULL UNIQUE, | ||
|
|
||
| -- Set after the bloom filter data has been added | ||
| uploaded BOOL NOT NULL DEFAULT FALSE, | ||
| uploaded UPLOADEDSTATE NOT NULL, | ||
|
|
||
| project CHAR(48) REFERENCES projects (project_id) on DELETE CASCADE | ||
| ); | ||
|
|
||
| CREATE INDEX ON dataproviders (project); | ||
| CREATE INDEX ON dataproviders (uploaded); | ||
|
|
||
| CREATE TYPE UPLOADSTATE AS ENUM ( | ||
| 'pending', | ||
| 'ready', | ||
| 'error' | ||
| -- It describes the state of the processing of the uploaded clks. | ||
| CREATE TYPE PROCESSEDSTATE AS ENUM ( | ||
| 'pending', -- waiting for some processing to be done | ||
| 'ready', -- processing done | ||
| 'error' -- an error occurred during the processing | ||
| ); | ||
|
|
||
| -- The encoded PII data for each dataprovider | ||
|
|
@@ -121,7 +129,7 @@ CREATE TABLE bloomingdata ( | |
| -- Store the raw CLK data in a file | ||
| file CHAR(64) NOT NULL, | ||
|
|
||
| state UPLOADSTATE NOT NULL, | ||
| state PROCESSEDSTATE NOT NULL, | ||
|
|
||
| -- Size in bytes of the uploaded encoding | ||
| encoding_size INT NULL, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to write a message to the logger at high severity level as well here.