File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,13 @@ def _restatement_intervals_across_all_environments(
400400
401401 snapshots_to_restate : t .Dict [SnapshotId , t .Tuple [SnapshotTableInfo , Interval ]] = {}
402402
403- for env in self .state_sync .get_environments ():
403+ for env_summary in self .state_sync .get_environments_summary ():
404+ # Fetch the full environment object one at a time to avoid loading all environments into memory at once
405+ env = self .state_sync .get_environment (env_summary .name )
406+ if not env :
407+ logger .warning ("Environment %s not found" , env_summary .name )
408+ continue
409+
404410 keyed_snapshots = {s .name : s .table_info for s in env .snapshots }
405411
406412 # We dont just restate matching snapshots, we also have to restate anything downstream of them
You can’t perform that action at this time.
0 commit comments