Store raw tokens instead of dictionaries in metadata#243
Store raw tokens instead of dictionaries in metadata#243
Conversation
c8de727 to
21d105d
Compare
|
If we want to evolve per-user settings (eg when to expire/remove messages)
then we will need more than just a single setting.
Also, having a dictionary quite directly maps imap key-value metadata
so i think the simplification here is not that useful
and requires more work if we add more keys.
…On Sat, Mar 23, 2024 at 19:05 -0700, link2xt wrote:
You can view, comment on, or merge this pull request online at:
#243
-- Commit Summary --
* Store raw tokens instead of dictionaries in metadata
-- File Changes --
M chatmaild/src/chatmaild/metadata.py (33)
-- Patch Links --
https://github.com/deltachat/chatmail/pull/243.patch
https://github.com/deltachat/chatmail/pull/243.diff
--
Reply to this email directly or view it on GitHub:
#243
You are receiving this because your review was requested.
Message ID: ***@***.***>
|
|
|
|
On Sun, Mar 24, 2024 at 11:25 -0700, link2xt wrote:
`SETMETADATA` requests can be sent concurrently, in which case we will overwrite the whole dictionary.
Wasn't there something with dovecot that serializes all metadata-operations or do i misremember?
If indeed we have concurrency then the current way is insufficient
and i think going for guid-dir and store files like `token` etc. is
the easiest as it also makes accessing it from other processes trivial.
I btw tried to find a way to use the vmail-dir of a user but couldn't easily find one.
|
|
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 |
|
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. |
|
it seems that both SETMETADATA and GETMETADATA transmit the e-mail address to our dict-proxy, so we probably don't need any hacks. |
|
#254 is merged, closing this |
Follow-up to #239 before we deploy it to nine