| 23 | static constexpr uint64_t DEFAULT_CREATE_INDEX_WAL_THRESHOLD = 256ull * 1024 * 1024; |
| 24 | |
| 25 | static uint64_t getCreateIndexWalThreshold() { |
| 26 | const auto* threshold = std::getenv("LBUG_CREATE_INDEX_WAL_THRESHOLD"); // NOLINT(*-mt-unsafe) |
| 27 | if (threshold == nullptr || threshold[0] == '\0') { |
| 28 | return DEFAULT_CREATE_INDEX_WAL_THRESHOLD; |
| 29 | } |
| 30 | char* end = nullptr; |
| 31 | const auto parsed = std::strtoull(threshold, &end, 10); |
| 32 | if (end == threshold || *end != '\0') { |
| 33 | return DEFAULT_CREATE_INDEX_WAL_THRESHOLD; |
| 34 | } |
| 35 | return parsed; |
| 36 | } |
| 37 | |
| 38 | static std::string getExistingIndexName(Catalog* catalog, transaction::Transaction* transaction, |
| 39 | common::table_id_t tableID, common::property_id_t propertyID) { |