-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
In initialization of multistage checkpointing
Lines 1170 to 1185 in 23dea91
| v = get_write_and_read_counts(); | |
| sort(v.begin(),v.end()); | |
| mid=v[snaps-sn_ram]; | |
| // cout << mid << endl; | |
| for(int i=snaps-1;i>=0;i--) | |
| { | |
| if(v[i]>=mid && num<sn_ram) | |
| { | |
| where[i]=true; | |
| num++; | |
| } | |
| else | |
| { | |
| where[i]=false; | |
| } | |
| } |
since v is sorted this always sets the last sn_ram elements of where to true, and the other elements to false, irrespective of the result of get_write_and_read_counts.
I think v should be copied before the sort (e.g. into w), and then the conditional replaced with
if(w[i]>=mid && num<sn_ram)
Metadata
Metadata
Assignees
Labels
No labels