Correctness is more important than pretty URLs imo. Many other sites and applications use a query parameter to show the notification, and consistency with general practice is useful - advanced users can learn they can trim off the notification query string.
You should also consider that race conditions reduce user trust in the application, whereas savvy users will recognize extraneous parameters as sometimes being a necessary evil in http.
What you could also do is have a 'close' button or text link on the notification text that sends the user to the same page without the notification qp, and which will both remove the message and tidy up the url.
Correctness is more important than pretty URLs imo. Many other sites and applications use a query parameter to show the notification, and consistency with general practice is useful - advanced users can learn they can trim off the notification query string.
You should also consider that race conditions reduce user trust in the application, whereas savvy users will recognize extraneous parameters as sometimes being a necessary evil in http.
What you could also do is have a 'close' button or text link on the notification text that sends the user to the same page without the notification qp, and which will both remove the message and tidy up the url.