Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const (
defaultCloseTTLSeconds = 86400
openExecutionTTLBuffer = int64(86400) // setting it to a day to account for shard going down

maxCassandraTTL = int64(630720000) // Cassandra TTL maximum, 20 years in second
// ref: https://docs.datastax.com/en/dse-trblshoot/doc/troubleshooting/recoveringTtlYear2038Problem.html
maxCassandraTTL = int64(315360000) // Cassandra max support time is 2038-01-19T03:14:06+00:00. Updated this to 10 years to support until year 2028
Copy link
Contributor

@alexshtin alexshtin Oct 13, 2020

Choose a reason for hiding this comment

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

Why not:

func maxCassandraTTL() int64 { 
    return (time.Date(2038,01,19,03,14,06,0,time.UTC).Sub(time.Now().UTC())).Milliseconds()
}

Copy link
Contributor

Choose a reason for hiding this comment

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

We have default timeouts of 10 years.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

depending on whether we are still going to support Cassandra after 10 years
the solution from uber is much more simpler.

@samarabbas what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed with @wxing1292. The main issue is we need a concept of infinite timeout in Temporal. Using a default of 10 years introduces a scalability bottleneck. Here are couple of issues tracking this:
#358
#573

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not even 10 but 8 years. I don't understand why they picked up some random number instead of properly set to the real limit Cassandra gives us. It is used in 2 places only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, I guess as long as the time is really long (far in the future), then it is ok? BTW, cadence picked 5 years...

)

const (
Expand Down