MapStore2 icon indicating copy to clipboard operation
MapStore2 copied to clipboard

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

Open nmco opened this issue 2 years ago • 5 comments

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

nmco avatar Apr 05 '22 08:04 nmco

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 avatar Apr 05 '22 09:04 nmco

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

taba90 avatar Apr 07 '22 09:04 taba90

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

fostash avatar Apr 13 '22 11:04 fostash

Start working on that

fostash avatar Apr 26 '22 12:04 fostash

@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 https://github.com/geosolutions-it/mapstore2/issues/8053 ?

giohappy avatar May 26 '22 08:05 giohappy

@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.

nmco avatar Nov 15 '22 13:11 nmco