stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
3.53k stars 135 forks source link

[bug]: Exporting with foundationdb fails #520

Open swerter opened 3 weeks ago

swerter commented 3 weeks ago

What happened?

When exporting the whole database, foundationdb complains that the transaction is too old:

./stalwart-mail --config=/usr/local/etc/stalwart/config.toml  --export /opt/stalwart-mail/export
Exporting database to /opt/stalwart-mail/export/property.
Exporting database to /opt/stalwart-mail/export/acl.
Exporting database to /opt/stalwart-mail/export/fts_index.
Exporting database to /opt/stalwart-mail/export/queue.
Exporting database to /opt/stalwart-mail/export/config.
Exporting database to /opt/stalwart-mail/export/directory.
Exporting database to /opt/stalwart-mail/export/blob.
Exporting database to /opt/stalwart-mail/export/log.
Exporting database to /opt/stalwart-mail/export/bitmap.
Exporting database to /opt/stalwart-mail/export/lookup.
Exporting database to /opt/stalwart-mail/export/index.
Failed to iterate over data store: Internal Error: FoundationDB error: Transaction is too old to perform reads or be committed

Anything else I can provide you with?

The setup is pretty standard:

directory.internal.cache.entries = 500
directory.internal.store = "foundationdb"
directory.internal.type = "internal"
store.foundationdb.compression = "lz4"
store.foundationdb.purge.frequency = "0 3 *"
store.foundationdb.type = "foundationdb"

Thanks a lot for your help.

How can we reproduce the problem?

I can reproduce the problem by doing the following steps:

Version

v0.7.x

What database are you using?

FoundationDB

What blob storage are you using?

S3-compatible

Where is your directory located?

Internal

What operating system are you using?

None

Relevant log output

./stalwart-mail --config=/usr/local/etc/stalwart/config.toml  --export /opt/stalwart-mail/export
Exporting database to /opt/stalwart-mail/export/property.
Exporting database to /opt/stalwart-mail/export/acl.
Exporting database to /opt/stalwart-mail/export/fts_index.
Exporting database to /opt/stalwart-mail/export/queue.
Exporting database to /opt/stalwart-mail/export/config.
Exporting database to /opt/stalwart-mail/export/directory.
Exporting database to /opt/stalwart-mail/export/blob.
Exporting database to /opt/stalwart-mail/export/log.
Exporting database to /opt/stalwart-mail/export/bitmap.
Exporting database to /opt/stalwart-mail/export/lookup.
Exporting database to /opt/stalwart-mail/export/index.
Failed to iterate over data store: Internal Error: FoundationDB error: Transaction is too old to perform reads or be committed

Code of Conduct

mdecimus commented 2 weeks ago

Thanks, a fix for this is going to be included in version 0.8.3.

swerter commented 2 weeks ago

Fantastic, thanks a lot!

mdecimus commented 1 week ago

I'll leave it open to track the issue.