| 1028 | } |
| 1029 | |
| 1030 | void TxGraphImpl::ClearLocator(int level, GraphIndex idx, bool oversized_tx) noexcept |
| 1031 | { |
| 1032 | auto& entry = m_entries[idx]; |
| 1033 | auto& clusterset = GetClusterSet(level); |
| 1034 | Assume(entry.m_locator[level].IsPresent()); |
| 1035 | // Change the locator from Present to Missing or Removed. |
| 1036 | if (level == 0 || !entry.m_locator[level - 1].IsPresent()) { |
| 1037 | entry.m_locator[level].SetMissing(); |
| 1038 | } else { |
| 1039 | entry.m_locator[level].SetRemoved(); |
| 1040 | clusterset.m_removed.push_back(idx); |
| 1041 | } |
| 1042 | // Update the transaction count. |
| 1043 | --clusterset.m_txcount; |
| 1044 | clusterset.m_txcount_oversized -= oversized_tx; |
| 1045 | // If clearing main, adjust the status of Locators of this transaction in staging, if it exists. |
| 1046 | if (level == 0 && GetTopLevel() == 1) { |
| 1047 | if (entry.m_locator[1].IsRemoved()) { |
| 1048 | entry.m_locator[1].SetMissing(); |
| 1049 | } else if (!entry.m_locator[1].IsPresent()) { |
| 1050 | --m_staging_clusterset->m_txcount; |
| 1051 | m_staging_clusterset->m_txcount_oversized -= oversized_tx; |
| 1052 | } |
| 1053 | } |
| 1054 | if (level == 0) ClearChunkData(entry); |
| 1055 | } |
| 1056 | |
| 1057 | void GenericClusterImpl::RemoveChunkData(TxGraphImpl& graph) noexcept |
| 1058 | { |
no test coverage detected