适配器重放/弹性查询恢复期间的CTI [英] CTIs during adapter replay / resilient query recovery period

查看:75
本文介绍了适配器重放/弹性查询恢复期间的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

解决方案

问题在于您正在创建CTI。您应该执行其中一个 - 手动创建CTI或生成它们。不是都。生成的CTI始终基于正在排队的事件的时间戳。


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

解决方案

The problem is that you are creating CTIs. You should do one or the other - either create CTIs manually or have them generated. Not both. Generated CTIs are always based on the timestamps from the events that are being enqueued.


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆