Skip to content

Commit

Permalink
Develop (#297)
Browse files Browse the repository at this point in the history
* 217: fix unused code.

* 217: unused code and warning

* disabled man pages for rmb

* Bugfix/283 virtual mailbox fetch metadata (#284)

* Develop (#282)

* 217: fix unused code.

* 217: unused code and warning

* disabled man pages for rmb

* #283: fetch metadata for mails in virtual mailbox

* #283: fix metadata date.saved. date.received virtual mailbox

* #283: version

* Feature/286 use guid from UUID string (#287)

* #256: use guid_128_from_uuid_string instead of guid_128_from_string, to support older uuid formats like RECORD or MICROSOFT, always use compact for printing

* version 0.0.25 preparations

* #286: build issue

* merge

* version

* #286: prefere cached mail guid.

* #286: determine if uuid has - hyphon, if true preseve it.

* fix non void return

* Feature/289 GitHub actions (#290)

* #289: build

* #289: build plugin.

* #289: submodules

* submodules

* upgrade git

* clean outdated repos

* Bugfix/UUID record format (#293)

* bugfix initialisaction rados_mail->deprecated_uid

* rados_mail creation and default value check

* #295: update index after full object has been moved (metadata) (#296)
  • Loading branch information
jrse authored Mar 8, 2022
1 parent 526bebd commit 3d35948
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Change Log
## [0.0.28](https://github.com/ceph-dovecot/dovecot-ceph-plugin/tree/0.0.25) (2022-02-28)

- bugfix: wait for metadata copy before updating index (MOVE Mail)
- enhancement: in case we have more then one mail process (imap, pop3,..) running at the same time,
do not print warning message if mail access fails due to old index entry .

## [0.0.27](https://github.com/ceph-dovecot/dovecot-ceph-plugin/tree/0.0.25) (2022-02-28)

- bugfix initialisation rados_mail->deprecated_uid
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

AC_PREREQ([2.59])

AC_INIT([dovecot-ceph-plugin], [0.0.27], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin])
AC_INIT([dovecot-ceph-plugin], [0.0.28], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin])

AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src])
Expand Down
4 changes: 3 additions & 1 deletion rpm/dovecot-ceph-plugin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

Name: dovecot-ceph-plugin
Summary: Dovecot Ceph RADOS plugins
Version: 0.0.27

Version: 0.0.28


Release: 0%{?dist}
URL: https://github.com/ceph-dovecot/dovecot-ceph-plugin
Expand Down
5 changes: 4 additions & 1 deletion src/storage-rbox/rbox-copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ static int move_mail(struct mail_save_context *ctx, librmb::RadosStorage *rados_
guid_128_from_string(src_oid.c_str(), item->oid);
array_append(&rbox->moved_items, &item, 1);

rbox_move_index(ctx, mail);
if (r_storage->save_log->is_open()) {
std::list<librmb::RadosMetadata *> metadata;
librmb::RadosMetadata mailbox_guid(librmb::RBOX_METADATA_MAILBOX_GUID, guid_128_to_string(rbox->mailbox_guid));
Expand All @@ -283,6 +282,10 @@ static int move_mail(struct mail_save_context *ctx, librmb::RadosStorage *rados_
dest_oid, *ns_dest, rados_storage->get_pool_name(),
librmb::RadosSaveLogEntry::op_mv(*ns_src, src_oid, dest_mbox->list->ns->owner->username, metadata)));
}
//#295: move index after updating the meterdata to avoid having a index entry with a
// reference to an object with nonexisting metadata.
rbox_move_index(ctx, mail);

#ifdef DEBUG
i_debug("move successfully finished from %s (ns=%s) to %s (ns=%s)", src_oid.c_str(), ns_src->c_str(), src_oid.c_str(),
ns_dest->c_str());
Expand Down
6 changes: 5 additions & 1 deletion src/storage-rbox/rbox-mail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,11 @@ static int rbox_mail_get_stream(struct mail *_mail, bool get_body ATTR_UNUSED, s

if (ret < 0) {
if (ret == -ENOENT) {
i_warning("Mail not found. %s, ns='%s', process %d, alt_storage(%d) -> marking mail as expunged!",
// This can happen, if we have more then 2 processes running at the same time.
// if one deletes a mail, the other will only notice, when it tries to access it.
// so its reasonable to set this to debug log level. Other plugins not even do that
// in this case.
i_debug("Mail not found. %s, ns='%s', process %d, alt_storage(%d) -> marking mail as expunged!",
rmail->rados_mail->get_oid()->c_str(), rados_storage->get_namespace().c_str(), getpid(), alt_storage);
rbox_mail_set_expunged(rmail);
FUNC_END_RET("ret == -1");
Expand Down

0 comments on commit 3d35948

Please sign in to comment.