Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fix for WPS exports fail for all file formats except CSV - GeoServer #8053

Open
nmco opened this issue Apr 5, 2022 · 6 comments
Open

Comments

@nmco
Copy link

nmco commented Apr 5, 2022

As per THIS comment, we need full cloning of the HttpServelt request.

@nmco nmco assigned aaime and shad-git and unassigned aaime Apr 5, 2022
@nmco nmco changed the title Implement fix fro WPS exports fail for all file formats except CSV - GeoServer Implement fix for WPS exports fail for all file formats except CSV - GeoServer Apr 5, 2022
@nmco
Copy link
Author

nmco commented Apr 5, 2022

Meeting minutes:

  • Looks like the full fix will require deep cloning of the HTTP HttpServletRequest request while we pass it to the Dispatcher.REQUEST.
  • This is not specific to this issue, having a deep clone will avoid this type of strange issue in the future.
  • As @aaime says deep cloning that object is not going to be easy, it needs to be efficient and clone all attributes recursively.
  • @taba90 will think about an approach to handle this situation and check the plan with @aaime. We will time box this plan | estimate to 2 hours.

@nmco nmco assigned taba90 and unassigned shad-git Apr 5, 2022
@taba90
Copy link
Contributor

taba90 commented Apr 7, 2022

This is the plan as dicussed and suggested by Andrea:

  • we are not going to do a deep copy of the whole HttpServletRequest, but only of the parameters.
  • the copy should be performed everytime a threadpool is at stake. As suggested to be sure we intercept all the scenario we can use a ThreadLocalTransfer
  • Currently we have one of them handling the ThreadLocal holding the Dispatcher Request. It is a singleton bean defined here and use a generic mechanism based on reflection to do so.
  • The suggested approach is thus to use RequestWrapper that internally will do a copy of the request parameters like this wrapper but taking care of deep copying them instead of doing a shallow one, and passing the parameters to an internal map that will be used in the wrapper method accessing the parameters.
  • The wrapper will be instantiated during the handling of the Dispatcher Request Thread local transfer. A new ThreadLocalTransfer implementation will thus handle this and will replace the type of the one currently defined for the DispatcherRequest

@fostash
Copy link

fostash commented Apr 13, 2022

@nmco @taba90 The plan and estimation looks good to me

@fostash
Copy link

fostash commented Apr 26, 2022

Start working on that

@nmco nmco unassigned taba90 May 2, 2022
@giohappy
Copy link
Contributor

giohappy commented May 26, 2022

@nmco any news on this? The epic connected to this issue has been closed, saying that a fix was applied. But it's not clear to me if, where and what.

Is this a duplicate of #8053 ?

@nmco
Copy link
Author

nmco commented Nov 15, 2022

@Fausto did some work on this @taba90, we need to understand what exactly, I think it was the workaround and now we miss the correct fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants