| 434 | } |
| 435 | |
| 436 | CSN VersionMetadata::tryGetCSN(TransactionID tid) |
| 437 | { |
| 438 | auto csn = TransactionLog::getCSN(tid); |
| 439 | if (!csn && TransactionLog::instance().tryGetRunningTransaction(tid.getHash()) == nullptr) |
| 440 | { |
| 441 | /// CSN might be updated during the gap between TransactionLog::getCSN and TransactionLog::instance().tryGetRunningTransaction |
| 442 | csn = TransactionLog::getCSN(tid); |
| 443 | |
| 444 | /// The transaction is not running, and has no CSN -> it is rolled back |
| 445 | if (!csn) |
| 446 | { |
| 447 | LOG_TRACE(log, "Object {}, tid {} is rolled back", getObjectName(), tid); |
| 448 | return Tx::RolledBackCSN; |
| 449 | } |
| 450 | } |
| 451 | LOG_TRACE(log, "Object {}, tid {}, try get csn {}", getObjectName(), tid, csn); |
| 452 | return csn; |
| 453 | } |
| 454 | |
| 455 | void VersionMetadata::validateInfo(const String & object_name, const VersionInfo & info) |
| 456 | { |
nothing calls this directly
no test coverage detected