| 2195 | } |
| 2196 | |
| 2197 | void KeyValueStoreSQLite::startReadThreads() { |
| 2198 | int nReadThreads = readCursors.size(); |
| 2199 | TaskPriority taskId = g_network->getCurrentTask(); |
| 2200 | g_network->setCurrentTask(TaskPriority::DiskRead); |
| 2201 | for (int i = 0; i < nReadThreads; i++) { |
| 2202 | std::string threadName = format("fdb-sqlite-r-%d", i); |
| 2203 | if (threadName.size() > 15) { |
| 2204 | threadName = "fdb-sqlite-r"; |
| 2205 | } |
| 2206 | // Note: the below is actually a coroutine and not a thread. |
| 2207 | readThreads->addThread( |
| 2208 | new Reader(filename, type == KeyValueStoreType::SSD_BTREE_V2, readsComplete, logID, &readCursors[i]), |
| 2209 | threadName.c_str()); |
| 2210 | } |
| 2211 | g_network->setCurrentTask(taskId); |
| 2212 | } |
| 2213 | |
| 2214 | void KeyValueStoreSQLite::set(KeyValueRef keyValue, const Arena* arena) { |
| 2215 | ++writesRequested; |
no test coverage detected