Skip to content

skip in-mem history accumulation in sd for offline execution#19433

Open
sudeepdino008 wants to merge 7 commits intomainfrom
sdhist
Open

skip in-mem history accumulation in sd for offline execution#19433
sudeepdino008 wants to merge 7 commits intomainfrom
sdhist

Conversation

@sudeepdino008
Copy link
Member

@sudeepdino008 sudeepdino008 commented Feb 23, 2026

  • stage_exec or rebuild commitment fills up faster because sd stores history now..

@sudeepdino008 sudeepdino008 changed the title [wip] skip in-mem history accumulation in sd for offline execution skip in-mem history accumulation in sd for offline execution Feb 24, 2026
@sudeepdino008 sudeepdino008 marked this pull request as ready for review February 24, 2026 09:02
@sudeepdino008 sudeepdino008 requested a review from mh0lt February 24, 2026 09:02
}

func (sd *TemporalMemBatch) GetAsOf(domain kv.Domain, key []byte, ts uint64) (v []byte, ok bool, err error) {
if !sd.inMemHistoryReads {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I guess GetAsOf used by parallel exec @mh0lt ?
  • also if you drop old updates i guess you will get invalid state after flush SD to db? (i don't know)

Copy link
Member Author

@sudeepdino008 sudeepdino008 Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's only used for rpc (#18575)

`also if you drop old updates i guess you will get invalid state after flush SD to db?``

  • no we only use this data for rpc (GEtAsOf -- to provide read since now we collect updates temporalmembatch rather than commit tx). Flush SD to db ignores these old updates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need the in memory reads during exec and rpc processing. These are cleared on flush, but they are also in the ETL queue so after flush the DB will reflect the previous in memory state.

}

func (sd *TemporalMemBatch) GetAsOf(domain kv.Domain, key []byte, ts uint64) (v []byte, ok bool, err error) {
if !sd.inMemHistoryReads {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need the in memory reads during exec and rpc processing. These are cleared on flush, but they are also in the ETL queue so after flush the DB will reflect the previous in memory state.

@sudeepdino008 sudeepdino008 enabled auto-merge (squash) March 4, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants