| 4801 | } |
| 4802 | |
| 4803 | int Rdb_dict_manager::commit(rocksdb::WriteBatch *const batch, |
| 4804 | const bool sync) const { |
| 4805 | if (!batch) return HA_ERR_ROCKSDB_COMMIT_FAILED; |
| 4806 | int res = HA_EXIT_SUCCESS; |
| 4807 | rocksdb::WriteOptions options; |
| 4808 | options.sync = sync; |
| 4809 | rocksdb::TransactionDBWriteOptimizations optimize; |
| 4810 | optimize.skip_concurrency_control = true; |
| 4811 | rocksdb::Status s = m_db->Write(options, optimize, batch); |
| 4812 | res = !s.ok(); // we return true when something failed |
| 4813 | if (res) { |
| 4814 | rdb_handle_io_error(s, RDB_IO_ERROR_DICT_COMMIT); |
| 4815 | } |
| 4816 | batch->Clear(); |
| 4817 | return res; |
| 4818 | } |
| 4819 | |
| 4820 | void Rdb_dict_manager::dump_index_id(uchar *const netbuf, |
| 4821 | Rdb_key_def::DATA_DICT_TYPE dict_type, |
no test coverage detected