In our project we use workflows with multiple activity retries and long WF timeout (syncronisaion process with another services).
So I want to understand how my Temporal Database memory will be consumed.
Is a new table raw related to ActivityTask created every time this Activity is processed? So if I retry Activity 1000 times will 1000 records be created which consumes large amount of memory?
Or does it use existing information about Activity and does not create new record for every attempt?
I am working on two approaches with retries:
First Approach: Temporal Activity Retries
Temporal will try to retry activity when code throws an exception.
So we can see Activity Pending in UI
Second Approach: Manual activity retries like here:
synced = false
while(!synced) {
try{
activity.start()
synced = true
} catch (exception) {
//log and continue retries
}
}
So in UI History we can see new ActivityTask for every manual retry.
I am wondering what approach will be better to avoid multiple records creation and save memory in my Temporal DB cluster.
Or maybe there is some sort of clearing mechanism that will delete old acitivityTask records