0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::db: Add version for manifest write feature; enable reflection.

ircd::db: Add version for WAL full feature w/ reflection.

ircd::db: Add version for no-WAL manifest write error w/ reflection.

ircd::db: Add version for featured IO_MID/IO_USER levels w/ reflection.

ircd::db: Add version for Change Temperature compaction reason w/ reflection.

ircd::db: Add version for Fixed Blob GC compaction reason w/ reflection.
This commit is contained in:
Jason Volk 2022-07-09 13:07:54 -07:00
parent 22c6baeef7
commit 94e4891187
2 changed files with 73 additions and 6 deletions

View file

@ -5601,6 +5601,12 @@ ircd::db::reflect(const rocksdb::FlushReason &r)
case Reason::kAutoCompaction: return "AutoCompaction";
case Reason::kManualFlush: return "ManualFlush";
case Reason::kErrorRecovery: return "kErrorRecovery";
#ifdef IRCD_DB_HAS_FLUSH_RETRY
case Reason::kErrorRecoveryRetryFlush: return "kErrorRecoveryRetryFlush";
#endif
#ifdef IRCD_DB_HAS_WAL_FULL
case Reason::kWalFull: return "kWalFull";
#endif
}
return "??????";
@ -5631,6 +5637,12 @@ ircd::db::reflect(const rocksdb::CompactionReason &r)
#ifdef IRCD_DB_HAS_PERIODIC_COMPACTIONS
case Reason::kPeriodicCompaction: return "kPeriodicCompaction";
#endif
#ifdef IRCD_DB_HAS_CHANGE_TEMPERATURE
case Reason::kChangeTemperature: return "kChangeTemperature";
#endif
#ifdef IRCD_DB_HAS_FORCED_BLOBGC
case Reason::kForcedBlobGC: return "kForcedBlobGC";
#endif
case Reason::kNumOfReasons:
break;
@ -5646,12 +5658,18 @@ ircd::db::reflect(const rocksdb::BackgroundErrorReason &r)
switch(r)
{
case Reason::kFlush: return "FLUSH";
case Reason::kCompaction: return "COMPACTION";
case Reason::kWriteCallback: return "WRITE";
case Reason::kMemTable: return "MEMTABLE";
#if 0 // unreleased
case Reason::kManifestWrite: return "MANIFESTWRITE";
case Reason::kFlush: return "FLUSH";
case Reason::kCompaction: return "COMPACTION";
case Reason::kWriteCallback: return "WRITE";
case Reason::kMemTable: return "MEMTABLE";
#ifdef IRCD_DB_HAS_MANIFEST_WRITE
case Reason::kManifestWrite: return "MANIFESTWRITE";
#endif
#ifdef IRCD_DB_HAS_FLUSH_RETRY
case Reason::kFlushNoWAL: return "FLUSHNOWAL";
#endif
#ifdef IRCD_DB_HAS_MANIFEST_WRITE_NOWAL
case Reason::kManifestWriteNoWAL: return "MANIFESTWRITENOWAL";
#endif
}
@ -5701,7 +5719,13 @@ ircd::db::reflect(const rocksdb::Env::IOPriority &p)
switch(p)
{
case Priority::IO_LOW: return "IO_LOW";
#ifdef IRCD_DB_HAS_IO_MID
case Priority::IO_MID: return "IO_MID";
#endif
case Priority::IO_HIGH: return "IO_HIGH";
#ifdef IRCD_DB_HAS_IO_USER
case Priority::IO_USER: return "IO_USER";
#endif
case Priority::IO_TOTAL: break;
}

View file

@ -79,12 +79,36 @@
#define IRCD_DB_HAS_MULTIGET_DIRECT
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 12) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 12 && ROCKSDB_PATCH >= 6)
#define IRCD_DB_HAS_MANIFEST_WRITE
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 14) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 14 && ROCKSDB_PATCH >= 5)
#define IRCD_DB_HAS_FLUSH_RETRY
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 16) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 16 && ROCKSDB_PATCH >= 3)
#define IRCD_DB_HAS_MANIFEST_WRITE_NOWAL
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 19) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 19 && ROCKSDB_PATCH >= 3)
#define IRCD_DB_HAS_VERSION_ABI
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 20) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 20 && ROCKSDB_PATCH >= 3)
#define IRCD_DB_HAS_WAL_FULL
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 22) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 22 && ROCKSDB_PATCH >= 1)
@ -96,3 +120,22 @@
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 22 && ROCKSDB_PATCH >= 1)
#define IRCD_DB_HAS_CACHE_APPLYTOALL
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 24) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 24 && ROCKSDB_PATCH >= 2)
#define IRCD_DB_HAS_CHANGE_TEMPERATURE
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 25) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 25 && ROCKSDB_PATCH >= 1)
#define IRCD_DB_HAS_IO_MID
#define IRCD_DB_HAS_IO_USER
#endif
#if ROCKSDB_MAJOR > 6 \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR > 26) \
|| (ROCKSDB_MAJOR == 6 && ROCKSDB_MINOR == 26 && ROCKSDB_PATCH >= 0)
#define IRCD_DB_HAS_FORCED_BLOBGC
#endif