@@ -659,8 +659,6 @@ void TExecutor::ActivateWaitingTransactions(const TVector<TIntrusivePtr<NPageCol
659
659
} else {
660
660
EnqueueActivation (seat, activate);
661
661
}
662
- } else {
663
- Y_Fail (" Unexpected wait pad triggered" );
664
662
}
665
663
}
666
664
if (cancelled && activate) {
@@ -2033,7 +2031,6 @@ void TExecutor::PostponeTransaction(TSeat* seat, TPageCollectionTxEnv &env,
2033
2031
2034
2032
ui32 touchedPages = 0 ;
2035
2033
ui32 newPinnedPages = 0 ;
2036
- ui32 loadPages = 0 ;
2037
2034
ui64 prevTouched = seat->MemoryTouched ;
2038
2035
2039
2036
PrivatePageCache->PinTouches (seat->Pinned , touchedPages, newPinnedPages, seat->MemoryTouched );
@@ -2044,6 +2041,7 @@ void TExecutor::PostponeTransaction(TSeat* seat, TPageCollectionTxEnv &env,
2044
2041
prevTouched = seat->MemoryTouched ;
2045
2042
2046
2043
PrivatePageCache->PinToLoad (seat->Pinned , newPinnedPages, seat->MemoryTouched );
2044
+ ui64 loadBytes = seat->MemoryTouched - prevTouched;
2047
2045
TransactionPagesMemory += seat->MemoryTouched - prevTouched;
2048
2046
2049
2047
if (seat->AttachedMemory )
@@ -2122,42 +2120,34 @@ void TExecutor::PostponeTransaction(TSeat* seat, TPageCollectionTxEnv &env,
2122
2120
auto waitPad = MakeIntrusive<TTransactionWaitPad>(seat);
2123
2121
TransactionWaitPads[waitPad.Get ()] = waitPad;
2124
2122
2125
- ui32 waitPages = 0 ;
2126
- ui64 loadBytes = 0 ;
2123
+ ui32 loadPages = 0 ;
2127
2124
auto toLoad = PrivatePageCache->GetToLoad ();
2128
- for (auto &xpair : toLoad) {
2129
- TPrivatePageCache::TInfo *pageCollectionInfo = xpair.first ;
2130
- TVector<NTable::TPageId> &pages = xpair.second ;
2131
- waitPages += pages.size ();
2132
-
2133
- const std::pair<ui32, ui64> toLoad = PrivatePageCache->Request (pages, pageCollectionInfo);
2134
- if (toLoad.first ) {
2135
- if (auto logl = Logger->Log (ELnLev::Dbg03)) {
2136
- logl
2137
- << NFmt::Do (*this ) << " requests PageCollection " << pageCollectionInfo->PageCollection ->Label ()
2138
- << " " << toLoad.second << " bytes, " << toLoad.first << " pages: [" ;
2139
- for (auto i : xrange (pages.size ())) {
2140
- if (i != 0 ) logl << " , " ;
2141
- logl << pages[i] << " " << ui32 (pageCollectionInfo->GetPageType (pages[i]));
2142
- }
2143
- logl << " ]" ;
2125
+ for (auto &[pageCollectionInfo, pages] : toLoad) {
2126
+ Y_DEBUG_ABORT_UNLESS (pages);
2127
+ loadPages += pages.size ();
2128
+
2129
+ if (auto logl = Logger->Log (ELnLev::Dbg03)) {
2130
+ logl
2131
+ << NFmt::Do (*this ) << " requests PageCollection " << pageCollectionInfo->PageCollection ->Label ()
2132
+ << " " << pages.size () << " pages: [" ;
2133
+ for (auto i : xrange (pages.size ())) {
2134
+ if (i != 0 ) logl << " , " ;
2135
+ logl << pages[i] << " " << ui32 (pageCollectionInfo->GetPageType (pages[i]));
2144
2136
}
2137
+ logl << " ]" ;
2138
+ }
2145
2139
2146
- auto *req = new NPageCollection::TFetch (0 , pageCollectionInfo->PageCollection , std::move (pages));
2147
- req->TraceId = waitPad->GetWaitingTraceId ();
2148
- req->WaitPad = waitPad; // TODO: deal with one tx multiple fetches
2140
+ auto *req = new NPageCollection::TFetch (0 , pageCollectionInfo->PageCollection , std::move (pages));
2141
+ req->TraceId = waitPad->GetWaitingTraceId ();
2142
+ req->WaitPad = waitPad; // TODO: deal with one tx multiple fetches
2149
2143
2150
- loadPages += toLoad.first ;
2151
- loadBytes += toLoad.second ;
2152
- RequestFromSharedCache (req, NBlockIO::EPriority::Fast, EPageCollectionRequest::Cache);
2153
- }
2144
+ RequestFromSharedCache (req, NBlockIO::EPriority::Fast, EPageCollectionRequest::Cache);
2154
2145
}
2155
2146
2156
2147
if (auto logl = Logger->Log (ELnLev::Debug)) {
2157
2148
logl
2158
2149
<< NFmt::Do (*this ) << " " << NFmt::Do (*seat) << " postponed"
2159
- << " , " << loadBytes << " b, pages "
2160
- << " {" << waitPages << " wait, " << loadPages << " load}"
2150
+ << " , loading " << loadPages << " pages, " << loadBytes << " bytes"
2161
2151
<< " , freshly touched " << newPinnedPages << " pages" ;
2162
2152
}
2163
2153
0 commit comments