Skip to content
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

Store raw tokens instead of dictionaries in metadata #243

Closed
wants to merge 1 commit into from

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Mar 24, 2024

Follow-up to #239 before we deploy it to nine

@link2xt link2xt requested a review from hpk42 March 24, 2024 02:04
@link2xt link2xt force-pushed the link2xt/store-raw-tokens branch from c8de727 to 21d105d Compare March 24, 2024 02:12
@hpk42
Copy link
Contributor

hpk42 commented Mar 24, 2024 via email

@link2xt
Copy link
Contributor Author

link2xt commented Mar 24, 2024

marshal will not work for storing multiple settings unless we also use lockfiles for each file. SETMETADATA requests can be sent concurrently, in which case we will overwrite the whole dictionary. We should use dbm then or create a folder for guid and store files like token, setting1, setting2 separately rather than trying to put everything into a single file.

@hpk42
Copy link
Contributor

hpk42 commented Mar 24, 2024 via email

@hpk42
Copy link
Contributor

hpk42 commented Mar 25, 2024

meanwhile @link2xt and me discussed to store metadata-settings into a directory structure with each setting being a separate file -- preferably living inside the per-user maildir

@link2xt
Copy link
Contributor Author

link2xt commented Mar 25, 2024

Finding per-user maildir from guid is not easy, solution at https://dovecot.org/list/dovecot/2018-May/111694.html is hacky. Using guid as a folder name is good enough for now.

@hpk42
Copy link
Contributor

hpk42 commented Mar 27, 2024

it seems that both SETMETADATA and GETMETADATA transmit the e-mail address to our dict-proxy,
in the begin-transaction and in the lookup, respectively.

B13\tlkj123poi@c2.testrun.org
S13\tpriv/43f5f508a7ea0366dff30200c15250e3/devicetoken\tl1kj23lk123
C13

Lpriv/43f5f508a7ea0366dff30200c15250e3/devicetoken\tlkj123poi@c2.testrun.org

so we probably don't need any hacks.

@hpk42
Copy link
Contributor

hpk42 commented Mar 28, 2024

#254 is merged, closing this

@hpk42 hpk42 closed this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants