annotate src/lib-index/mail-transaction-log-private.h @ 9623:3da42dafa798 HEAD

buffer_create_[const_]data() API change: Take buffer_t as parameter instead of allocating it.
author Timo Sirainen <tss@iki.fi>
date Mon, 13 Jul 2009 21:11:05 -0400
parents 0b3d90514e85
children b09d9350a2d9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6410
e4eb71ae8e96 Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents: 6360
diff changeset
1 #ifndef MAIL_TRANSACTION_LOG_VIEW_H
e4eb71ae8e96 Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents: 6360
diff changeset
2 #define MAIL_TRANSACTION_LOG_VIEW_H
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
9623
3da42dafa798 buffer_create_[const_]data() API change: Take buffer_t as parameter instead of allocating it.
Timo Sirainen <tss@iki.fi>
parents: 9311
diff changeset
4 #include "buffer.h"
1920
d11efbf1d341 Added fcntl_lock_disable setting to allow indexes to work with NFS. Some
Timo Sirainen <tss@iki.fi>
parents: 1915
diff changeset
5 #include "file-dotlock.h"
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 #include "mail-transaction-log.h"
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7
6360
461ae76c84da Replaced MAIL_INDEX_LOCK_SECS usage with cache/index/log specific defines
Timo Sirainen <tss@iki.fi>
parents: 5881
diff changeset
8 /* Synchronization can take a while sometimes, especially when copying lots of
461ae76c84da Replaced MAIL_INDEX_LOCK_SECS usage with cache/index/log specific defines
Timo Sirainen <tss@iki.fi>
parents: 5881
diff changeset
9 mails. */
461ae76c84da Replaced MAIL_INDEX_LOCK_SECS usage with cache/index/log specific defines
Timo Sirainen <tss@iki.fi>
parents: 5881
diff changeset
10 #define MAIL_TRANSCATION_LOG_LOCK_TIMEOUT (3*60)
461ae76c84da Replaced MAIL_INDEX_LOCK_SECS usage with cache/index/log specific defines
Timo Sirainen <tss@iki.fi>
parents: 5881
diff changeset
11 #define MAIL_TRANSCATION_LOG_LOCK_CHANGE_TIMEOUT (3*60)
461ae76c84da Replaced MAIL_INDEX_LOCK_SECS usage with cache/index/log specific defines
Timo Sirainen <tss@iki.fi>
parents: 5881
diff changeset
12
5283
8f9af66ee313 If transaction log grows larger than 1MB, rotate it even if it was created
Timo Sirainen <tss@iki.fi>
parents: 4876
diff changeset
13 /* Rotate when log is older than ROTATE_TIME and larger than MIN_SIZE */
5813
9b4987348cf6 Removed debug #defines and changed log rotation size defaults.
Timo Sirainen <tss@iki.fi>
parents: 5749
diff changeset
14 #define MAIL_TRANSACTION_LOG_ROTATE_MIN_SIZE (1024*32)
5283
8f9af66ee313 If transaction log grows larger than 1MB, rotate it even if it was created
Timo Sirainen <tss@iki.fi>
parents: 4876
diff changeset
15 /* If log is larger than MAX_SIZE, rotate regardless of the time */
8f9af66ee313 If transaction log grows larger than 1MB, rotate it even if it was created
Timo Sirainen <tss@iki.fi>
parents: 4876
diff changeset
16 #define MAIL_TRANSACTION_LOG_ROTATE_MAX_SIZE (1024*1024)
3180
ef16bb8091aa Several transaction log cleanups and fixes.
Timo Sirainen <tss@iki.fi>
parents: 3146
diff changeset
17 #define MAIL_TRANSACTION_LOG_ROTATE_TIME (60*5)
ef16bb8091aa Several transaction log cleanups and fixes.
Timo Sirainen <tss@iki.fi>
parents: 3146
diff changeset
18
5881
7b7ce27f2b13 Delete over 30 minutes old .log.2 files when opening indexes.
Timo Sirainen <tss@iki.fi>
parents: 5849
diff changeset
19 /* Delete .log.2 files older than this many seconds */
7b7ce27f2b13 Delete over 30 minutes old .log.2 files when opening indexes.
Timo Sirainen <tss@iki.fi>
parents: 5849
diff changeset
20 #define MAIL_TRANSACTION_LOG2_STALE_SECS (60*30)
7b7ce27f2b13 Delete over 30 minutes old .log.2 files when opening indexes.
Timo Sirainen <tss@iki.fi>
parents: 5849
diff changeset
21
3243
40b4ba3c55b8 In-memory indexes work again. Just pass dir as NULL to mail_index_alloc().
Timo Sirainen <tss@iki.fi>
parents: 3180
diff changeset
22 #define MAIL_TRANSACTION_LOG_FILE_IN_MEMORY(file) ((file)->fd == -1)
40b4ba3c55b8 In-memory indexes work again. Just pass dir as NULL to mail_index_alloc().
Timo Sirainen <tss@iki.fi>
parents: 3180
diff changeset
23
7812
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
24 #define LOG_FILE_MODSEQ_CACHE_SIZE 10
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
25
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
26 struct modseq_cache {
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
27 uoff_t offset;
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
28 uint64_t highest_modseq;
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
29 };
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
30
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31 struct mail_transaction_log_file {
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
32 struct mail_transaction_log *log;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33 struct mail_transaction_log_file *next;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
34
4828
7cc1b8fec8ab Reference counting fixes. Fixes an assert crash when closing the index.
Timo Sirainen <tss@iki.fi>
parents: 4785
diff changeset
35 /* refcount=0 is a valid state. files start that way, and they're
7cc1b8fec8ab Reference counting fixes. Fixes an assert crash when closing the index.
Timo Sirainen <tss@iki.fi>
parents: 4785
diff changeset
36 freed only when mail_transaction_logs_clean() is called. */
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
37 int refcount;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
38
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
39 char *filepath;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
40 int fd;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
41
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
42 ino_t st_ino;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
43 dev_t st_dev;
1976
4e0269adb24a Don't rotate transaction log too often
Timo Sirainen <tss@iki.fi>
parents: 1974
diff changeset
44 time_t last_mtime;
3320
0403596c93fd index.log file is now rotated to .index.log.2 file. When log file is
Timo Sirainen <tss@iki.fi>
parents: 3243
diff changeset
45 uoff_t last_size;
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
46
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
47 struct mail_transaction_log_header hdr;
9623
3da42dafa798 buffer_create_[const_]data() API change: Take buffer_t as parameter instead of allocating it.
Timo Sirainen <tss@iki.fi>
parents: 9311
diff changeset
48 buffer_t mmap_buffer;
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
49 buffer_t *buffer;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
50 uoff_t buffer_offset;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
51 void *mmap_base;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
52 size_t mmap_size;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
53
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
54 /* points to the next uncommitted transaction. usually same as EOF. */
2407
fed6d07bd8ee Transaction log file is now read-lockless.
Timo Sirainen <tss@iki.fi>
parents: 1976
diff changeset
55 uoff_t sync_offset;
7812
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
56 /* highest modseq at sync_offset */
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
57 uint64_t sync_highest_modseq;
5749
420a386fa27a int/ext/mailbox sync offset changes: Combined mailbox and int offsets to
Timo Sirainen <tss@iki.fi>
parents: 5716
diff changeset
58 /* saved_tail_offset is the offset that was last written to transaction
420a386fa27a int/ext/mailbox sync offset changes: Combined mailbox and int offsets to
Timo Sirainen <tss@iki.fi>
parents: 5716
diff changeset
59 log. max_tail_offset is what should be written to the log the next
420a386fa27a int/ext/mailbox sync offset changes: Combined mailbox and int offsets to
Timo Sirainen <tss@iki.fi>
parents: 5716
diff changeset
60 time a transaction is written. transaction log handling may update
420a386fa27a int/ext/mailbox sync offset changes: Combined mailbox and int offsets to
Timo Sirainen <tss@iki.fi>
parents: 5716
diff changeset
61 max_tail_offset automatically by making it skip external transactions
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
62 after the last saved offset (to avoid re-reading them unneededly). */
5749
420a386fa27a int/ext/mailbox sync offset changes: Combined mailbox and int offsets to
Timo Sirainen <tss@iki.fi>
parents: 5716
diff changeset
63 uoff_t saved_tail_offset, max_tail_offset;
8136
285f636884dc Don't give bogus "log_file_tail_offset shrank" errors.
Timo Sirainen <tss@iki.fi>
parents: 7931
diff changeset
64 /* don't give warnings about saved_tail_offset shrinking if
285f636884dc Don't give bogus "log_file_tail_offset shrank" errors.
Timo Sirainen <tss@iki.fi>
parents: 7931
diff changeset
65 sync_offset is less than this. */
285f636884dc Don't give bogus "log_file_tail_offset shrank" errors.
Timo Sirainen <tss@iki.fi>
parents: 7931
diff changeset
66 uoff_t saved_tail_sync_offset;
2407
fed6d07bd8ee Transaction log file is now read-lockless.
Timo Sirainen <tss@iki.fi>
parents: 1976
diff changeset
67
7812
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
68 struct modseq_cache modseq_cache[LOG_FILE_MODSEQ_CACHE_SIZE];
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
69
4876
f1d77064884c Lock handling changes. Everything goes through file-lock API now and there's
Timo Sirainen <tss@iki.fi>
parents: 4828
diff changeset
70 struct file_lock *file_lock;
f1d77064884c Lock handling changes. Everything goes through file-lock API now and there's
Timo Sirainen <tss@iki.fi>
parents: 4828
diff changeset
71
2407
fed6d07bd8ee Transaction log file is now read-lockless.
Timo Sirainen <tss@iki.fi>
parents: 1976
diff changeset
72 unsigned int locked:1;
5819
4ea31bf18a56 Handle indexid changes better.
Timo Sirainen <tss@iki.fi>
parents: 5813
diff changeset
73 unsigned int corrupted:1;
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
74 };
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
75
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
76 struct mail_transaction_log {
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
77 struct mail_index *index;
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
78 struct mail_transaction_log_view *views;
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
79
4785
a18fa2b4bf06 Code cleanup
Timo Sirainen <tss@iki.fi>
parents: 4777
diff changeset
80 /* files is a linked list of all the opened log files. the list is
a18fa2b4bf06 Code cleanup
Timo Sirainen <tss@iki.fi>
parents: 4777
diff changeset
81 sorted by the log file sequence, so that transaction views can use
a18fa2b4bf06 Code cleanup
Timo Sirainen <tss@iki.fi>
parents: 4777
diff changeset
82 them easily. head contains a pointer to the newest log file. */
a18fa2b4bf06 Code cleanup
Timo Sirainen <tss@iki.fi>
parents: 4777
diff changeset
83 struct mail_transaction_log_file *files, *head;
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
84 /* open_file is used temporarily while opening the log file.
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
85 if _open() failed, it's left there for _create(). */
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
86 struct mail_transaction_log_file *open_file;
1974
d85f71ffeb8f file_dotlock_open/delete/replace now has lock_suffix parameter. NULL
Timo Sirainen <tss@iki.fi>
parents: 1933
diff changeset
87
d85f71ffeb8f file_dotlock_open/delete/replace now has lock_suffix parameter. NULL
Timo Sirainen <tss@iki.fi>
parents: 1933
diff changeset
88 unsigned int dotlock_count;
3106
9c4aa309dbac Changed dotlocking API.
Timo Sirainen <tss@iki.fi>
parents: 2407
diff changeset
89 struct dotlock_settings dotlock_settings, new_dotlock_settings;
9c4aa309dbac Changed dotlocking API.
Timo Sirainen <tss@iki.fi>
parents: 2407
diff changeset
90 struct dotlock *dotlock;
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
91 };
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
92
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
93 void
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
94 mail_transaction_log_file_set_corrupted(struct mail_transaction_log_file *file,
3342
43d4aad84752 Minor error checking fixes.
Timo Sirainen <tss@iki.fi>
parents: 3320
diff changeset
95 const char *fmt, ...)
6411
6a64e64fa3a3 Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
96 ATTR_FORMAT(2, 3);
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
97
5687
d28185a3131a Moved mail transaction log file related code to its own file.
Timo Sirainen <tss@iki.fi>
parents: 5283
diff changeset
98 struct mail_transaction_log_file *
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
99 mail_transaction_log_file_alloc_in_memory(struct mail_transaction_log *log);
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
100 struct mail_transaction_log_file *
5687
d28185a3131a Moved mail transaction log file related code to its own file.
Timo Sirainen <tss@iki.fi>
parents: 5283
diff changeset
101 mail_transaction_log_file_alloc(struct mail_transaction_log *log,
d28185a3131a Moved mail transaction log file related code to its own file.
Timo Sirainen <tss@iki.fi>
parents: 5283
diff changeset
102 const char *path);
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
103 void mail_transaction_log_file_free(struct mail_transaction_log_file **file);
5687
d28185a3131a Moved mail transaction log file related code to its own file.
Timo Sirainen <tss@iki.fi>
parents: 5283
diff changeset
104
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
105 int mail_transaction_log_file_open(struct mail_transaction_log_file *file,
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
106 bool check_existing);
5849
a9df50952600 Added support for resetting index.
Timo Sirainen <tss@iki.fi>
parents: 5819
diff changeset
107 int mail_transaction_log_file_create(struct mail_transaction_log_file *file,
a9df50952600 Added support for resetting index.
Timo Sirainen <tss@iki.fi>
parents: 5819
diff changeset
108 bool reset);
5687
d28185a3131a Moved mail transaction log file related code to its own file.
Timo Sirainen <tss@iki.fi>
parents: 5283
diff changeset
109 int mail_transaction_log_file_lock(struct mail_transaction_log_file *file);
d28185a3131a Moved mail transaction log file related code to its own file.
Timo Sirainen <tss@iki.fi>
parents: 5283
diff changeset
110
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
111 int mail_transaction_log_find_file(struct mail_transaction_log *log,
6802
ba58eaf06763 Keep better track of when we need to flush NFS attribute caches.
Timo Sirainen <tss@iki.fi>
parents: 6411
diff changeset
112 uint32_t file_seq, bool nfs_flush,
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
113 struct mail_transaction_log_file **file_r);
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
114
5716
4a08705e97f5 Fixes to mail_transaction_log_file_map() error handling.
Timo Sirainen <tss@iki.fi>
parents: 5714
diff changeset
115 /* Returns 1 if ok, 0 if file is corrupted or offset range is invalid,
4a08705e97f5 Fixes to mail_transaction_log_file_map() error handling.
Timo Sirainen <tss@iki.fi>
parents: 5714
diff changeset
116 -1 if I/O error */
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
117 int mail_transaction_log_file_map(struct mail_transaction_log_file *file,
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
118 uoff_t start_offset, uoff_t end_offset);
5714
dcf5dbb6a76a mail_transaction_log_move_to_memory() can't fail anymore. Moved the code to
Timo Sirainen <tss@iki.fi>
parents: 5689
diff changeset
119 void mail_transaction_log_file_move_to_memory(struct mail_transaction_log_file
dcf5dbb6a76a mail_transaction_log_move_to_memory() can't fail anymore. Moved the code to
Timo Sirainen <tss@iki.fi>
parents: 5689
diff changeset
120 *file);
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
121
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
122 void mail_transaction_logs_clean(struct mail_transaction_log *log);
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
123
5689
c2362f144f15 Initial commit for major index file code cleanup.
Timo Sirainen <tss@iki.fi>
parents: 5687
diff changeset
124 bool mail_transaction_log_want_rotate(struct mail_transaction_log *log);
5849
a9df50952600 Added support for resetting index.
Timo Sirainen <tss@iki.fi>
parents: 5819
diff changeset
125 int mail_transaction_log_rotate(struct mail_transaction_log *log, bool reset);
3146
9a8bf1c86699 Moved code into mail-transaction-log-append.c
Timo Sirainen <tss@iki.fi>
parents: 3106
diff changeset
126 int mail_transaction_log_lock_head(struct mail_transaction_log *log);
9a8bf1c86699 Moved code into mail-transaction-log-append.c
Timo Sirainen <tss@iki.fi>
parents: 3106
diff changeset
127 void mail_transaction_log_file_unlock(struct mail_transaction_log_file *file);
9a8bf1c86699 Moved code into mail-transaction-log-append.c
Timo Sirainen <tss@iki.fi>
parents: 3106
diff changeset
128
7812
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
129 bool
7931
502cfdcc5650 Keep modseqs as 1 until the first modseq ext intro record enables them.
Timo Sirainen <tss@iki.fi>
parents: 7812
diff changeset
130 mail_transaction_header_has_modseq(const struct mail_transaction_header *hdr,
502cfdcc5650 Keep modseqs as 1 until the first modseq ext intro record enables them.
Timo Sirainen <tss@iki.fi>
parents: 7812
diff changeset
131 const void *data,
502cfdcc5650 Keep modseqs as 1 until the first modseq ext intro record enables them.
Timo Sirainen <tss@iki.fi>
parents: 7812
diff changeset
132 uint64_t cur_modseq);
7812
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
133 int mail_transaction_log_file_get_highest_modseq_at(
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
134 struct mail_transaction_log_file *file,
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
135 uoff_t offset, uint64_t *highest_modseq_r);
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
136 int mail_transaction_log_file_get_modseq_next_offset(
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
137 struct mail_transaction_log_file *file,
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
138 uint64_t modseq, uoff_t *next_offset_r);
d10cb44ab446 Modseqs are no longer calculated from transaction log sequence + offset.
Timo Sirainen <tss@iki.fi>
parents: 6802
diff changeset
139
1915
79790750c349 importing new index code. mbox still broken.
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
140 #endif