diff --git a/Builds/VisualStudio2015/RippleD.vcxproj b/Builds/VisualStudio2015/RippleD.vcxproj index 948d857cfb..7f4e618378 100644 --- a/Builds/VisualStudio2015/RippleD.vcxproj +++ b/Builds/VisualStudio2015/RippleD.vcxproj @@ -3349,6 +3349,16 @@ ..\..\src\soci\include\private;..\..\src\soci\src\core;..\..\src\sqlite;%(AdditionalIncludeDirectories) ..\..\src\soci\include\private;..\..\src\soci\src\core;..\..\src\sqlite;%(AdditionalIncludeDirectories) + + True + + + + + True + + + True @@ -3362,16 +3372,41 @@ + + True + + + True + + + + True + + + + + True + + + True + + True + + + + + True + True @@ -3385,29 +3420,64 @@ + + True + True + + True + + + True + + + True + True + + True + + + True + + + True - + True - + + + + True + + True + + True + + + + + True + + + True @@ -3418,6 +3488,8 @@ + + @@ -3430,6 +3502,16 @@ + + True + + + + + True + + + True @@ -3450,12 +3532,17 @@ True + + + + True + + + True - - - + True @@ -3472,6 +3559,11 @@ + + True + + + True @@ -3482,21 +3574,70 @@ + + True + + + True + + True + + + + + True + + + + + True + + + + + True + + + True + + + True + + + True + + + + + True + + + + + + + + + + + + + @@ -3509,22 +3650,36 @@ - + + + + + + + + + + + + + + + @@ -3533,6 +3688,10 @@ + + + + @@ -3541,6 +3700,8 @@ + + @@ -3549,17 +3710,136 @@ + + + + + + + + + + + + - + + + + + + True + + + True + + + + + True + + + + + True + + + + + + + + + True + + + + + True + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + True + + + + + True + + + + + True + + @@ -3575,6 +3855,20 @@ + + + + + + + + + + + + + + True @@ -3585,6 +3879,11 @@ + + True + + + True @@ -3605,11 +3904,6 @@ - - True - - - True @@ -3635,9 +3929,6 @@ - - True - @@ -3648,6 +3939,25 @@ + + + + True + + + + + True + + + + + True + + + + + True @@ -3655,16 +3965,28 @@ - + True - + True + + True + + + + + True + + + + + True @@ -3690,11 +4012,20 @@ + + + + True + + + True + + @@ -3702,23 +4033,35 @@ - + - + - + - + + + + + True + + True + + + True True + + True + True @@ -3756,11 +4099,68 @@ + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + + + True + + + True + + True + + + True + + + + + + + True @@ -3773,49 +4173,70 @@ - - True - - - True - - True - + + + + True + + True + True + + + + True + + + + + True - + True + + True - + True - + + + True - + + + True + + + + True + + + True @@ -3824,44 +4245,12 @@ - - True - - + - - True - - + - - True - - + - - True - - - - - True - - - - - True - - - - - - - True - - - True - @@ -3869,6 +4258,8 @@ + + True @@ -3876,19 +4267,9 @@ - + True - - True - - - True - - - - - @@ -3896,22 +4277,20 @@ - - True - True - + True - + True - - + + True + @@ -3924,14 +4303,18 @@ + + True + + + True - - True - + + True diff --git a/Builds/VisualStudio2015/RippleD.vcxproj.filters b/Builds/VisualStudio2015/RippleD.vcxproj.filters index 4f0da94aa8..6c907fd41c 100644 --- a/Builds/VisualStudio2015/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2015/RippleD.vcxproj.filters @@ -316,9 +316,15 @@ {15B4B65A-0F03-7BA9-38CD-42A5712392CB} + + {00C69D4E-70C5-4176-9C4E-C0D48BDEBDDA} + {6D89B6B8-9214-EC35-55E9-8F23F38CA4BD} + + {B54F0FEA-9D8B-74FB-589C-3B76405DA954} + {667DE39F-2604-4FE8-A614-819EEB24732D} @@ -331,20 +337,32 @@ {D3C48D7F-1D8E-CE9E-27C8-D55F5E5A5B87} + + {B32195A5-B4BA-3777-CCB9-2574EC4D434F} + + + {61E3ED6A-AC3E-1B94-A7B9-351B1F6F0553} + + + {C2E2A611-388D-7241-C2BB-317691062D69} + {0E10D53B-8D04-FF58-45C4-0ABCB1D35E7F} + + {DBFD954A-0008-4956-927A-B944200D245D} + {FC54DB48-EF4D-7E0F-DDFE-B3F38B0B7738} {A746507A-5BC2-4D28-1548-27C4A985BA1F} - - {07F5949C-8323-60C6-86FA-478527ACA329} + + {2F1E5091-DE86-9818-9678-CD46520BB6FF} - - {E8713421-1FD0-C069-9337-FA196101F1EB} + + {F99E2CD5-39AC-2E47-504E-7E90C0337658} {D1AC8B4A-AD89-99FE-E006-C5216043BF1C} @@ -355,6 +373,9 @@ {9127B497-2610-2304-EEC9-8BEFBE9EA84E} + + {948DD1FB-8935-5D38-8772-3147CF2453B9} + {54BB5EB5-AAE6-285E-E486-052F58B9C667} @@ -373,9 +394,15 @@ {ED8A5019-B4FC-AE9E-E99A-10137DCF03C1} + + {3743C661-4B1A-EDF5-5F7D-74FD09F6C0F7} + {395EACFC-5313-28FC-4686-B001C679D86A} + + {9EAFF616-0390-6B5C-34FD-9A98D7E01EE7} + {91DD523A-1974-4AD0-719D-F02BF0544FA3} @@ -3939,6 +3966,18 @@ ripple\unity + + rocksdb2\cache + + + rocksdb2\cache + + + rocksdb2\cache + + + rocksdb2\cache + rocksdb2\db @@ -3954,18 +3993,48 @@ rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db @@ -3981,25 +4050,52 @@ rocksdb2\db + + rocksdb2\db + rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db rocksdb2\db - + rocksdb2\db - + + rocksdb2\db + + + rocksdb2\db + + rocksdb2\db @@ -4008,6 +4104,18 @@ rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db @@ -4020,6 +4128,9 @@ rocksdb2\db + + rocksdb2\db + rocksdb2\db @@ -4035,6 +4146,18 @@ rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db @@ -4059,13 +4182,19 @@ rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db - - rocksdb2\db - - + rocksdb2\db @@ -4086,6 +4215,12 @@ rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db @@ -4098,27 +4233,87 @@ rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + rocksdb2\db + + rocksdb2\db + rocksdb2\db + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\db + + + rocksdb2\env + + + rocksdb2\env + + + rocksdb2\env + + + rocksdb2\env + + + rocksdb2\env + + + rocksdb2\env + + + rocksdb2\env + + + rocksdb2\env + rocksdb2\hdfs + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb @@ -4137,7 +4332,7 @@ rocksdb2\include\rocksdb - + rocksdb2\include\rocksdb @@ -4146,12 +4341,21 @@ rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb @@ -4161,6 +4365,18 @@ rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + + + rocksdb2\include\rocksdb + + + rocksdb2\include\rocksdb + + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb @@ -4173,6 +4389,12 @@ rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb @@ -4185,6 +4407,9 @@ rocksdb2\include\rocksdb\utilities + + rocksdb2\include\rocksdb\utilities + rocksdb2\include\rocksdb\utilities @@ -4197,23 +4422,170 @@ rocksdb2\include\rocksdb\utilities + + rocksdb2\include\rocksdb\utilities + rocksdb2\include\rocksdb\utilities rocksdb2\include\rocksdb\utilities + + rocksdb2\include\rocksdb\utilities + + + rocksdb2\include\rocksdb\utilities + + + rocksdb2\include\rocksdb\utilities + rocksdb2\include\rocksdb\utilities + + rocksdb2\include\rocksdb\utilities + rocksdb2\include\rocksdb + + rocksdb2\include\rocksdb + rocksdb2\include\rocksdb - - rocksdb2\port + + rocksdb2\include\rocksdb + + + rocksdb2\include\rocksdb + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\memtable + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\monitoring + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options + + + rocksdb2\options rocksdb2\port @@ -4233,6 +4605,27 @@ rocksdb2\port + + rocksdb2\port + + + rocksdb2\port + + + rocksdb2\port\win + + + rocksdb2\port\win + + + rocksdb2\port\win + + + rocksdb2\port\win + + + rocksdb2\port + rocksdb2\table @@ -4245,6 +4638,12 @@ rocksdb2\table + + rocksdb2\table + + + rocksdb2\table + rocksdb2\table @@ -4269,12 +4668,6 @@ rocksdb2\table - - rocksdb2\table - - - rocksdb2\table - rocksdb2\table @@ -4305,9 +4698,6 @@ rocksdb2\table - - rocksdb2\table - rocksdb2\table @@ -4320,6 +4710,30 @@ rocksdb2\table + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + rocksdb2\table @@ -4329,10 +4743,10 @@ rocksdb2\table - + rocksdb2\table - + rocksdb2\table @@ -4341,6 +4755,21 @@ rocksdb2\table + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + rocksdb2\table @@ -4371,12 +4800,24 @@ rocksdb2\table + + rocksdb2\table + + + rocksdb2\table + + + rocksdb2\table + rocksdb2\table rocksdb2\table + + rocksdb2\table + rocksdb2\table @@ -4386,27 +4827,42 @@ rocksdb2\table - - rocksdb2\third-party\rapidjson\internal + + rocksdb2\third-party\fbson - - rocksdb2\third-party\rapidjson\internal + + rocksdb2\third-party\fbson - - rocksdb2\third-party\rapidjson + + rocksdb2\third-party\fbson - - rocksdb2\third-party\rapidjson + + rocksdb2\third-party\fbson + + + rocksdb2\third-party\fbson + + + rocksdb2\tools rocksdb2\utilities\backupable + + rocksdb2\utilities\checkpoint + + + rocksdb2\utilities\checkpoint + rocksdb2\utilities\document rocksdb2\utilities\document + + rocksdb2\utilities\document + rocksdb2\utilities\geodb @@ -4452,12 +4908,81 @@ rocksdb2\utilities\spatialdb + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + + + rocksdb2\utilities\transactions + rocksdb2\utilities\ttl rocksdb2\utilities\ttl + + rocksdb2\utilities\write_batch_with_index + + + rocksdb2\utilities\write_batch_with_index + + + rocksdb2\utilities\write_batch_with_index + + + rocksdb2\util + + + rocksdb2\util + rocksdb2\util @@ -4473,54 +4998,84 @@ rocksdb2\util - - rocksdb2\util - - - rocksdb2\util - rocksdb2\util rocksdb2\util - + rocksdb2\util - + + + rocksdb2\util + rocksdb2\util rocksdb2\util + + rocksdb2\util + rocksdb2\util + + rocksdb2\util + + + rocksdb2\util + + + rocksdb2\util + + + rocksdb2\util + rocksdb2\util rocksdb2\util - + rocksdb2\util + + rocksdb2\util + rocksdb2\util rocksdb2\util - + rocksdb2\util - + + rocksdb2\util + + rocksdb2\util - + + rocksdb2\util + + rocksdb2\util + + rocksdb2\util + + + rocksdb2\util + + + rocksdb2\util + rocksdb2\util @@ -4530,51 +5085,15 @@ rocksdb2\util - - rocksdb2\util - - + rocksdb2\util - - rocksdb2\util - - + rocksdb2\util - - rocksdb2\util - - + rocksdb2\util - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - rocksdb2\util @@ -4584,6 +5103,9 @@ rocksdb2\util + + rocksdb2\util + rocksdb2\util @@ -4593,21 +5115,9 @@ rocksdb2\util - + rocksdb2\util - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - - - rocksdb2\util - rocksdb2\util @@ -4617,24 +5127,21 @@ rocksdb2\util - - rocksdb2\util - rocksdb2\util - + rocksdb2\util - + rocksdb2\util rocksdb2\util - + rocksdb2\util - + rocksdb2\util @@ -4650,15 +5157,21 @@ rocksdb2\util + + rocksdb2\util + + + rocksdb2\util + rocksdb2\util rocksdb2\util - + rocksdb2\util - + rocksdb2\util diff --git a/src/ripple/nodestore/backend/RocksDBFactory.cpp b/src/ripple/nodestore/backend/RocksDBFactory.cpp index 0ec7c62611..559f0e7489 100644 --- a/src/ripple/nodestore/backend/RocksDBFactory.cpp +++ b/src/ripple/nodestore/backend/RocksDBFactory.cpp @@ -118,10 +118,15 @@ public: options.env = env; if (keyValues.exists ("cache_mb")) - table_options.block_cache = rocksdb::NewLRUCache (get(keyValues, "cache_mb") * 1024L * 1024L); + table_options.block_cache = rocksdb::NewLRUCache ( + get(keyValues, "cache_mb") * 1024L * 1024L); if (auto const v = get(keyValues, "filter_bits")) - table_options.filter_policy.reset (rocksdb::NewBloomFilterPolicy (v)); + { + bool const filter_blocks = !keyValues.exists ("filter_full") || + (get(keyValues, "filter_full") == 0); + table_options.filter_policy.reset (rocksdb::NewBloomFilterPolicy (v, filter_blocks)); + } if (get_if_exists (keyValues, "open_files", options.max_open_files)) fdlimit_ = options.max_open_files; @@ -169,8 +174,28 @@ public: options.write_buffer_size = 6 * options.target_file_size_base; } + if (keyValues.exists("bbt_options")) + { + auto const s = rocksdb::GetBlockBasedTableOptionsFromString( + table_options, + get(keyValues, "bbt_options"), + &table_options); + if (! s.ok()) + Throw ( + std::string("Unable to set RocksDB bbt_options: ") + s.ToString()); + } + options.table_factory.reset(NewBlockBasedTableFactory(table_options)); + if (keyValues.exists("options")) + { + auto const s = rocksdb::GetOptionsFromString( + options, get(keyValues, "options"), &options); + if (! s.ok()) + Throw ( + std::string("Unable to set RocksDB options: ") + s.ToString()); + } + rocksdb::DB* db = nullptr; rocksdb::Status status = rocksdb::DB::Open (options, m_name, &db); if (! status.ok () || ! db) @@ -178,6 +203,12 @@ public: std::string("Unable to open/create RocksDB: ") + status.ToString()); m_db.reset (db); + + std::string s1, s2; + rocksdb::GetStringFromDBOptions(&s1, options, "; "); + rocksdb::GetStringFromColumnFamilyOptions(&s2, options, "; "); + JLOG(m_journal.debug()) << "RocksDB DBOptions: " << s1; + JLOG(m_journal.debug()) << "RocksDB CFOptions: " << s2; } ~RocksDBBackend () diff --git a/src/ripple/unity/rocksdb.cpp b/src/ripple/unity/rocksdb.cpp index b86b2c77ae..c7e11bde1d 100644 --- a/src/ripple/unity/rocksdb.cpp +++ b/src/ripple/unity/rocksdb.cpp @@ -48,110 +48,169 @@ #define NDEBUG #endif +#include +#include #include #include #include +#include #include +#include +#include #include +#include +#include #include -#include #include +#include #include +#include +#include +#include #include +#include +#include #include +#include +#include +#include #include -#include +#include +#include #include #include #include #include +#include +#include #include #include #include #include +#include #include #include #include #include +#include #include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include -#include -#include #include #include #include #include #include -#include #include #include +#include +#include +#include #include -#include +#include #include +#include +#include #include #include #include #include #include +#include #include #include #include #include -#include #include -#include #include +#include #include +#include #include -#include +#include #include -#include -#include -#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include #include -#include -#include -#include +#include #include -#include #include -#include +#include #include +#include #include #include #include -#include +#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include const char* rocksdb_build_git_sha = ""; const char* rocksdb_build_git_datetime = ""; diff --git a/src/ripple/unity/rocksdb.h b/src/ripple/unity/rocksdb.h index 2c7bd92e4a..0a38b36f6d 100644 --- a/src/ripple/unity/rocksdb.h +++ b/src/ripple/unity/rocksdb.h @@ -35,6 +35,7 @@ # define ROCKSDB_PLATFORM_WINDOWS #else # define ROCKSDB_PLATFORM_POSIX +# define ROCKSDB_LIB_IO_POSIX # if BEAST_MAC || BEAST_IOS # define OS_MACOSX 1 # elif BEAST_BSD @@ -60,6 +61,7 @@ #include #include #include +#include #include #include #include