diff --git a/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp b/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp index 065a6795ba87..267305d07de2 100644 --- a/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp +++ b/ydb/core/tx/schemeshard/schemeshard_billing_helpers.cpp @@ -44,14 +44,6 @@ TMeteringStats& operator -= (TMeteringStats& value, const TMeteringStats& other) return value; } -void TMeteringStatsHelper::TryFixOldFormat(TMeteringStats& value) { - // old format: assign upload to read - if (value.GetReadRows() == 0 && value.GetUploadRows() != 0) { - value.SetReadRows(value.GetUploadRows()); - value.SetReadBytes(value.GetUploadBytes()); - } -} - TMeteringStats TMeteringStatsHelper::ZeroValue() { // this method the only purpose is to beautifully print zero stats instead of empty protobuf or with missing fields TMeteringStats value; diff --git a/ydb/core/tx/schemeshard/schemeshard_billing_helpers.h b/ydb/core/tx/schemeshard/schemeshard_billing_helpers.h index 9fb91947497b..0b27fdbf4631 100644 --- a/ydb/core/tx/schemeshard/schemeshard_billing_helpers.h +++ b/ydb/core/tx/schemeshard/schemeshard_billing_helpers.h @@ -13,7 +13,6 @@ TMeteringStats& operator += (TMeteringStats& value, const TMeteringStats& other) TMeteringStats& operator -= (TMeteringStats& value, const TMeteringStats& other); struct TMeteringStatsHelper { - static void TryFixOldFormat(TMeteringStats& value); static TMeteringStats ZeroValue(); static bool IsZero(TMeteringStats& value); }; diff --git a/ydb/core/tx/schemeshard/schemeshard_info_types.h b/ydb/core/tx/schemeshard/schemeshard_info_types.h index 048d2dfdc067..ff8298cd958c 100644 --- a/ydb/core/tx/schemeshard/schemeshard_info_types.h +++ b/ydb/core/tx/schemeshard/schemeshard_info_types.h @@ -3614,18 +3614,12 @@ struct TIndexBuildInfo: public TSimpleRefCount { indexInfo->Billed.SetReadRows(row.template GetValueOrDefault(0)); indexInfo->Billed.SetReadBytes(row.template GetValueOrDefault(0)); indexInfo->Billed.SetCpuTimeUs(row.template GetValueOrDefault(0)); - if (indexInfo->IsOldBuildIndex()) { - TMeteringStatsHelper::TryFixOldFormat(indexInfo->Billed); - } indexInfo->Processed.SetUploadRows(row.template GetValueOrDefault(0)); indexInfo->Processed.SetUploadBytes(row.template GetValueOrDefault(0)); indexInfo->Processed.SetReadRows(row.template GetValueOrDefault(0)); indexInfo->Processed.SetReadBytes(row.template GetValueOrDefault(0)); indexInfo->Processed.SetCpuTimeUs(row.template GetValueOrDefault(0)); - if (indexInfo->IsOldBuildIndex()) { - TMeteringStatsHelper::TryFixOldFormat(indexInfo->Processed); - } // Restore the operation details: ImplTableDescriptions and SpecializedIndexDescription. if (row.template HaveValue()) { @@ -3703,9 +3697,6 @@ struct TIndexBuildInfo: public TSimpleRefCount { shardStatus.Processed.SetReadRows(row.template GetValueOrDefault(0)); shardStatus.Processed.SetReadBytes(row.template GetValueOrDefault(0)); shardStatus.Processed.SetCpuTimeUs(row.template GetValueOrDefault(0)); - if (IsOldBuildIndex()) { - TMeteringStatsHelper::TryFixOldFormat(shardStatus.Processed); - } Processed += shardStatus.Processed; } @@ -3713,10 +3704,6 @@ struct TIndexBuildInfo: public TSimpleRefCount { return CancelRequested; } - bool IsOldBuildIndex() const { - return IsBuildSecondaryIndex() || IsBuildColumns(); - } - TString InvalidBuildKind() { return TStringBuilder() << "Invalid index build kind " << static_cast(BuildKind) << " for index type " << static_cast(IndexType);