Does CN datacache and query_cache invalidated after restart/upgrade?

If we upgrade shared data cluster does datacache from disk will be invalidated and all queries should scan s3 storage again?

Yes. The data and query cache will be flushed.

Is there any way to rollout new version without performance degradation and s3 pressure?

We are using k8s operator to operate starrocks clusters