本文介绍了适配器重放/弹性查询恢复期间的CTI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在成功检查点后恢复查询时遇到此CTI问题。


我让我的恢复管理器记住应该插入事件的时间,所以当我正在恢复,它当时正在接受那些事件。


问题是我也让我的AdvanceTimeSettings在每个事件入队后的一个小宽限期后自动生成CTI。这在正常操作期间工作得很好,但是当我从
高水位标记重播我的事件时似乎会破坏。



 app.DefineObservable((DateTimeOffset?  hwm)  => 
Observable.Using( ()  => new RecoveryManager< Payload>(), 
rm => rm.RecoverFrom(hwm)
.Concat(/ * RealSource * /。Do(rm.Remember) ))
.ToPointStreamable(evt => evt.IsCti
?PointEvent< T> .CreateCti(new DateTimeOffset(evt.UtcDateTimeOffsetTicks,TimeSpan.FromHours(0)))
:PointEvent< T> .CreateInsert(new DateTimeOffset(evt.UtcDateTimeOffsetTicks,TimeSpan.FromHours(0)),evt.Record),
new AdvanceTimeSettings(
new AdvanceTimeGenerationSettings(TimeSpan.FromMilliseconds(15),TimeSpan.FromMilliseconds( 5)),
null,
AdvanceTimePolicy.Adjust));

                

在这种情况下,AdvanceTimeSettings是基于"Current REAL  Time"创建CTI,还是作为我正在制作的插入的偏移量,并使用CreateInsert的DateTimeOffset作为CTI的DateTimeOffset的基础?


在我重播恢复事件的过程中,我觉得我需要以某种方式关闭CTI代。这是疯了吗?


短篇小说,我在恢复过程中遇到了CTI违规行为。





Austin

解决方案


I have this CTI problem when I'm recovering my query after successful checkpoint.

I have my RecoveryManager remembering the Time the event should be inserted, so when I'm recovering, its Enquing those events at that time.

The problem is that I also have my AdvanceTimeSettings also automatically generating CTIs after a small grace period after each event is enqueued. Which works just fine during normal operation, but seems to break things when I'm replaying my events from the High Water Mark.

I have an input adapter similar to:

app.DefineObservable((DateTimeOffset? hwm) => 
Observable.Using(() => new RecoveryManager<Payload>(), 
      rm => rm.RecoverFrom(hwm)
            .Concat(/*RealSource*/.Do(rm.Remember)))
  .ToPointStreamable(evt => evt.IsCti
                        ? PointEvent<T>.CreateCti(new DateTimeOffset(evt.UtcDateTimeOffsetTicks, TimeSpan.FromHours(0)))
                        : PointEvent<T>.CreateInsert(new DateTimeOffset(evt.UtcDateTimeOffsetTicks, TimeSpan.FromHours(0)), evt.Record),
                        new AdvanceTimeSettings(
                        new AdvanceTimeGenerationSettings(TimeSpan.FromMilliseconds(15), TimeSpan.FromMilliseconds(5)),
                        null,
                        AdvanceTimePolicy.Adjust));

                

In this situation, is the AdvanceTimeSettings creating CTI's based off of "Current REAL Time", or as an offset from the Inserts I'm making, and using the CreateInsert's DateTimeOffset as the basis for the CTI's DateTimeOffset?

I'm feeling like I need to somehow shut off the CTI generation while I'm replaying my recovery events. Is this crazy?

Short story, I'm running into CTI violations during recovery.


Austin

解决方案


这篇关于适配器重放/弹性查询恢复期间的CTI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 00:23