File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ TTopicSdkTestSetup CreateSetup() {
113
113
setup.GetRuntime ().GetAppData ().PQConfig .SetTopicsAreFirstClassCitizen (true );
114
114
setup.GetRuntime ().GetAppData ().PQConfig .SetUseSrcIdMetaMappingInFirstClass (true );
115
115
setup.GetRuntime ().GetAppData ().PQConfig .SetBalancerWakeupIntervalSec (1 );
116
+ setup.GetRuntime ().GetAppData ().PQConfig .SetACLRetryTimeoutSec (1 );
116
117
117
118
return setup;
118
119
}
Original file line number Diff line number Diff line change @@ -618,6 +618,49 @@ Y_UNIT_TEST_SUITE(CommitOffset) {
618
618
return true ;
619
619
});
620
620
}
621
+
622
+ Y_UNIT_TEST (DistributedTxCommit_LongReadSession) {
623
+ TTopicSdkTestSetup setup = CreateSetup ();
624
+ PrepareAutopartitionedTopic (setup);
625
+
626
+ std::vector<NYdb::NTopic::TReadSessionEvent::TDataReceivedEvent> messages;
627
+
628
+ auto result = setup.Read (TEST_TOPIC, TEST_CONSUMER, [&](auto & x) {
629
+ messages.push_back (x);
630
+ return true ;
631
+ });
632
+
633
+ {
634
+ Cerr << " >>>>> Alter topic" << Endl << Flush;
635
+ TTopicClient client (setup.MakeDriver ());
636
+ TAlterTopicSettings settings;
637
+ settings.SetRetentionPeriod (TDuration::Hours (1 ));
638
+ client.AlterTopic (TEST_TOPIC, settings).GetValueSync ();
639
+ }
640
+
641
+ // Wait recheck acl happened
642
+ messages[0 ].GetMessages ()[0 ].Commit (); // trigger recheck
643
+ Sleep (TDuration::Seconds (5 ));
644
+
645
+ Cerr << " >>>>> Commit message" << Endl << Flush;
646
+
647
+ bool first = true ;
648
+ for (auto & e : messages) {
649
+ for (auto & m :e.GetMessages ()) {
650
+ if (first) {
651
+ first = false ;
652
+ continue ;
653
+ }
654
+ m.Commit ();
655
+ }
656
+ }
657
+
658
+ // Wait commit happened
659
+ Sleep (TDuration::Seconds (5 ));
660
+
661
+ result.Reader ->Close ();
662
+ }
663
+
621
664
}
622
665
623
666
} // namespace NKikimr
You can’t perform that action at this time.
0 commit comments