@@ -122,10 +122,33 @@ namespace NKikimr {
122122
123123 Send (MonActor, new TEvBlobStorage::TEvConfigureProxy (Info, nullptr ));
124124 if (Info) {
125- Y_ABORT_UNLESS (!EncryptionMode || *EncryptionMode == Info->GetEncryptionMode ());
126- Y_ABORT_UNLESS (!LifeCyclePhase || *LifeCyclePhase == Info->GetLifeCyclePhase ());
127- Y_ABORT_UNLESS (!GroupKeyNonce || *GroupKeyNonce == Info->GetGroupKeyNonce ());
128- Y_ABORT_UNLESS (!CypherKey || *CypherKey == *Info->GetCypherKey ());
125+ auto printOptional = [&](const auto & val) -> TString {
126+ using T = std::decay_t <decltype (*val)>;
127+ if (!val) {
128+ return " <nullopt>" ;
129+ } else {
130+ if constexpr (std::is_same_v<T, ui64>) {
131+ return IntToString<10 >(*val);
132+ }
133+ if constexpr (std::is_same_v<T, TBlobStorageGroupInfo::EEncryptionMode>) {
134+ return TBlobStorageGroupInfo::PrintEncryptionMode (*val);
135+ }
136+ if constexpr (std::is_same_v<T, TBlobStorageGroupInfo::ELifeCyclePhase>) {
137+ return TBlobStorageGroupInfo::PrintLifeCyclePhase (*val);
138+ }
139+ // we don't want to print CypherKey value!
140+ return " <value>" ;
141+ }
142+ };
143+
144+ Y_VERIFY_S (!EncryptionMode || *EncryptionMode == Info->GetEncryptionMode (),
145+ " EncryptionMode# " << printOptional (EncryptionMode, true ) << " Info# " << Info->ToString ());
146+ Y_VERIFY_S (!LifeCyclePhase || *LifeCyclePhase == Info->GetLifeCyclePhase (),
147+ " LifeCyclePhase# " << printOptional (LifeCyclePhase) << " Info# " << Info->ToString ());
148+ Y_VERIFY_S (!GroupKeyNonce || *GroupKeyNonce == Info->GetGroupKeyNonce (),
149+ " GroupKeyNonce# " << printOptional (GroupKeyNonce) << " Info# " << Info->ToString ());
150+ Y_VERIFY_S (!CypherKey || *CypherKey == *Info->GetCypherKey (),
151+ " CypherKey# " << printOptional (CypherKey) << " Info# " << Info->ToString ());
129152 EncryptionMode = Info->GetEncryptionMode ();
130153 LifeCyclePhase = Info->GetLifeCyclePhase ();
131154 GroupKeyNonce = Info->GetGroupKeyNonce ();
0 commit comments