| 902 | remove(); |
| 903 | } |
| 904 | void clear(KeyRangeRef keys) { |
| 905 | // TODO: This is really slow! |
| 906 | while (true) { |
| 907 | int r = moveTo(keys.begin); |
| 908 | if (r < 0) |
| 909 | moveNext(); |
| 910 | if (!valid || (db.fragment_values ? decodeKVFragment(getEncodedRow()).get().key |
| 911 | : decodeKV(getEncodedRow()).key) >= keys.end) |
| 912 | break; |
| 913 | remove(); |
| 914 | } |
| 915 | } |
| 916 | void fastClear(KeyRangeRef keys, bool& freeTableEmpty) { |
| 917 | std::vector<int> clearBuffer(SERVER_KNOBS->CLEAR_BUFFER_SIZE); |
| 918 | clearBuffer[0] = 0; |