projects
/
bluesky.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bf92d2
)
Code cleanup.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Tue, 20 Jul 2010 18:54:06 +0000
(11:54 -0700)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Tue, 20 Jul 2010 18:54:06 +0000
(11:54 -0700)
bluesky/log.c
patch
|
blob
|
history
diff --git
a/bluesky/log.c
b/bluesky/log.c
index
ee96976
..
4c522b8
100644
(file)
--- a/
bluesky/log.c
+++ b/
bluesky/log.c
@@
-139,12
+139,14
@@
static gpointer log_thread(gpointer d)
footer.crc = crc32c_finalize(crc);
writebuf(log->fd, (const char *)&footer, sizeof(footer));
footer.crc = crc32c_finalize(crc);
writebuf(log->fd, (const char *)&footer, sizeof(footer));
+ logsize += sizeof(header) + sizeof(footer);
+ logsize += strlen(item->key) + item->data->len;
+
committed = g_slist_prepend(committed, item);
/* Force an fsync either if we will be closing this log segment and
* opening a new file, or if there are no other log items currently
* waiting to be written. */
committed = g_slist_prepend(committed, item);
/* Force an fsync either if we will be closing this log segment and
* opening a new file, or if there are no other log items currently
* waiting to be written. */
- logsize += strlen(item->key) + item->data->len + sizeof(header) + sizeof(footer);
if (logsize >= LOG_SEGMENT_SIZE
|| g_async_queue_length(log->queue) <= 0)
if (logsize >= LOG_SEGMENT_SIZE
|| g_async_queue_length(log->queue) <= 0)