[Groonga-commit] groonga/grnxx at cb12bae [master] Reduce MAX_FILE_SIZE_UPPER_LIMIT to avoid an overflow.

アーカイブの一覧に戻る

susumu.yata null+****@clear*****
Tue May 7 18:16:21 JST 2013


susumu.yata	2013-05-07 18:16:21 +0900 (Tue, 07 May 2013)

  New Revision: cb12baed3d7de5ff3e34d1ccb39d8cf2f2dcd71d
  https://github.com/groonga/grnxx/commit/cb12baed3d7de5ff3e34d1ccb39d8cf2f2dcd71d

  Message:
    Reduce MAX_FILE_SIZE_UPPER_LIMIT to avoid an overflow.

  Modified files:
    lib/grnxx/storage.cpp

  Modified: lib/grnxx/storage.cpp (+7 -4)
===================================================================
--- lib/grnxx/storage.cpp    2013-05-07 18:01:08 +0900 (68a1577)
+++ lib/grnxx/storage.cpp    2013-05-07 18:16:21 +0900 (463cd7c)
@@ -24,13 +24,16 @@
 namespace grnxx {
 namespace {
 
-constexpr uint64_t MAX_FILE_SIZE_LOWER_LIMIT = 1ULL << 30;  // 1GB.
-constexpr uint64_t MAX_FILE_SIZE_UPPER_LIMIT = 1ULL << 63;  // 8EB.
-constexpr uint64_t MAX_FILE_SIZE_DEFAULT     = 1ULL << 40;  // 1TB.
+// 1GB-4EB (default: 1TB).
+constexpr uint64_t MAX_FILE_SIZE_LOWER_LIMIT = 1ULL << 30;
+constexpr uint64_t MAX_FILE_SIZE_UPPER_LIMIT = 1ULL << 62;
+constexpr uint64_t MAX_FILE_SIZE_DEFAULT     = 1ULL << 40;
+// 1-1000 (default: 1000).
 constexpr uint16_t MAX_NUM_FILES_LOWER_LIMIT = 1;
 constexpr uint16_t MAX_NUM_FILES_UPPER_LIMIT = 1000;
 constexpr uint16_t MAX_NUM_FILES_DEFAULT     = MAX_NUM_FILES_UPPER_LIMIT;
-constexpr uint64_t ROOT_SIZE_DEFAULT         = 1ULL << 12;  // 4KB.
+// 0-max_file_size bytes (default: 4KB).
+constexpr uint64_t ROOT_SIZE_DEFAULT         = 1ULL << 12;
 
 }  // namespace
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る