Skip to content

Commit d9f5407

Browse files
logging deserialization control (#16870)
1 parent b392a83 commit d9f5407

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ydb/core/formats/arrow/accessor/composite_serial/accessor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <ydb/core/formats/arrow/accessor/sparsed/constructor.h>
44

5+
#include <ydb/library/actors/core/log.h>
56
#include <ydb/library/actors/prof/tag.h>
67

78
namespace NKikimr::NArrow::NAccessor {
@@ -11,6 +12,10 @@ IChunkedArray::TLocalChunkedArrayAddress TDeserializeChunkedArray::DoGetLocalChu
1112
if (PredefinedArray) {
1213
return TLocalChunkedArrayAddress(PredefinedArray, 0, 0);
1314
}
15+
if (Counter.Inc() > 1) {
16+
AFL_WARN(NKikimrServices::ARROW_HELPER)("event", "many_deserializations")("counter", Counter.Val())("size", Data.size())(
17+
"buffer", DataBuffer.size());
18+
}
1419
if (!!Data) {
1520
return TLocalChunkedArrayAddress(Loader->ApplyVerified(Data, GetRecordsCount()), 0, 0);
1621
} else {

ydb/core/formats/arrow/accessor/composite_serial/accessor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class TDeserializeChunkedArray: public IChunkedArray {
1313
const TString Data;
1414
const TStringBuf DataBuffer;
1515
const bool ForLazyInitialization;
16+
mutable TAtomicCounter Counter = 0;
1617

1718
protected:
1819
virtual std::shared_ptr<IChunkedArray> DoISlice(const ui32 offset, const ui32 count) const override {

0 commit comments

Comments
 (0)