Add write throttling based on the size of the uncommitted journal
[bluesky.git] / bluesky / bluesky-private.h
index 5a55b79..2595367 100644 (file)
@@ -268,6 +268,10 @@ struct cloudlog_header {
     uint32_t size1, size2, size3;
 } __attribute__((packed));
 
+// Rough size limit for a log segment.  This is not a firm limit and there are
+// no absolute guarantees on the size of a log segment.
+#define LOG_SEGMENT_SIZE (1 << 22)
+
 #define JOURNAL_MAGIC "\nLog"
 #define CLOUDLOG_MAGIC "AgI-"
 #define CLOUDLOG_MAGIC_ENCRYPTED "AgI="     // CLOUDLOG_MAGIC[3] ^= 0x10