Hello Alessio,
I can't seem to find out exactly where that check was removed either (It
seemed to occur right in the middle of a bunch of bulk refactoring), and
agree the check should probably be restored.
Torben
On Tue, Oct 31, 2017 at 2:36 AM, Andrea Aime <[email protected]>
wrote:
> Hi Alessio,
> the mass file moves happened during the REST upgrade made it hard to track
> because
> we have had two IOUtils in two separate modules for a week or so, but I
> believe I'm at fault here,
> the inflate code I copied over did not contain saveFile anymore:
>
> https://github.com/geoserver/geoserver/commit/
> bd898da949c56013ff2239ffce7edcba6bb84966
>
> If I had to guess, that check is "magic", the caller is unaware of what's
> happening and the
> comment above it does not explain what's the logic for it.
> So no objection in fixing, maybe with a better explanation of what is
> going on in the commit, and/or
> maybe passing saveFile a parameter from the
> caller, where the context may make more evident what the check is about.
>
> Cheers
> Andrea
>
>
> On Tue, Oct 31, 2017 at 10:20 AM, Alessio Fabiani <alessio.fabiani@geo-
> solutions.it> wrote:
>
>> Sorry again :)
>>
>> Just to be clear this line
>>
>> boolean saveFile = files != null && request!=null && request.getMethod().
>> equals(Method.POST);
>>
>> *is* the correct one, not the issue. That line of code was present on
>> 2.11 and before and has been removed since 2.12.
>>
>> Sorry for the confusion.
>>
>>
>> Regards,
>>
>> Alessio Fabiani
>>
>> ==
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/it488V for more information.
>> ==
>>
>> Ing. Alessio Fabiani
>>
>> @alfa7691
>> Founder/Technical Lead
>>
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A
>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>> 55054 Massarosa
>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>> (LU)
>> Italy
>> phone: +39 0584 962313 <+39%200584%20962313>
>> fax: +39 0584 1660272 <+39%200584%20166%200272>
>> mob: +39 331 6233686 <+39%20331%20623%203686>
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>
>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>> principi dettati dal D.Lgs. 196/2003.
>>
>> The information in this message and/or attachments, is intended solely
>> for the attention and use of the named addressee(s) and may be confidential
>> or proprietary in nature or covered by the provisions of privacy act
>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>> copying, distribution, or either dissemination, either whole or partial, is
>> strictly forbidden except previous formal approval of the named
>> addressee(s). If you are not the intended recipient, please contact
>> immediately the sender by telephone, fax or e-mail and delete the
>> information in this message that has been received in error. The sender
>> does not give any warranty or accept liability as the content, accuracy or
>> completeness of sent messages and accepts no responsibility for changes
>> made after they were sent or for other risks which arise as a result of
>> e-mail transmission, viruses, etc.
>>
>> On Tue, Oct 31, 2017 at 10:08 AM, Alessio Fabiani <
>> [email protected]> wrote:
>>
>>> Dear all,
>>> sorry to bother you again on this topic.
>>>
>>> After a deeper inspection of the code and spending a lot of time
>>> comparing changes between 2.10/11 and 2.12/13 versions of GeoServer, I
>>> finally identified the real issue here.
>>>
>>> Trying to summarize (if something is not clear please let me know),
>>> currently the upload POST of zip file to RESTConfig DataStore is affected
>>> by an important issue which wasn't present on previous versions of
>>> GeoServer.
>>>
>>> Basically in the case you want to add files to a DataStore allowing more
>>> than one FeatureType, like as an instance a DB DataStore, the code
>>> currently leave old files into the datastore folder with two side-effects:
>>>
>>> 1. Even if you delete a Layer/FeatureType from the DataStore from the
>>> source store (let's say a table on the DB), it will be created again at the
>>> next POST since the code will find old source files on the upload folder.
>>> 2. We don't have control anymore on which Features are automatically
>>> configured via REST since the code has only two options: a) configure the
>>> first one in alphabetical order b) configure all of them (even the
>>> deleted/old ones)
>>>
>>> Long story short, the origin of this issue is due to this change:
>>>
>>> https://github.com/geoserver/geoserver/blob/2.11.x/src/rest/
>>> src/main/java/org/geoserver/rest/util/IOUtils.java#L786
>>>
>>> this small check has been removed from IOUtils since 2.12.x, but it was
>>> important in order to identify the files to be refreshed/cleared out after
>>> the upload, other than the .zip file.
>>>
>>> Now, I'm asking here if someone is aware of a specific reason to remove
>>> this check. If not I would propose to restore this line of code instead of
>>> trying to understand and modify the whole DataStoreRESTController workflow.
>>> An action must be taken anyway soon, since currently we have an important
>>> regression on GeoServer code.
>>>
>>> Thanks for you patience and please let me know your thoughts.
>>>
>>>
>>> Regards,
>>>
>>> Alessio Fabiani
>>>
>>> ==
>>> GeoServer Professional Services from the experts! Visit
>>> http://goo.gl/it488V for more information.
>>> ==
>>>
>>> Ing. Alessio Fabiani
>>>
>>> @alfa7691
>>> Founder/Technical Lead
>>>
>>>
>>> GeoSolutions S.A.S.
>>> Via di Montramito 3/A
>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>> 55054 Massarosa
>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>> (LU)
>>> Italy
>>> phone: +39 0584 962313 <0584%20962313>
>>> fax: +39 0584 1660272 <0584%20166%200272>
>>> mob: +39 331 6233686 <331%20623%203686>
>>>
>>> http://www.geo-solutions.it
>>> http://twitter.com/geosolutions_it
>>>
>>> -------------------------------------------------------
>>>
>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>
>>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>>> principi dettati dal D.Lgs. 196/2003.
>>>
>>> The information in this message and/or attachments, is intended solely
>>> for the attention and use of the named addressee(s) and may be confidential
>>> or proprietary in nature or covered by the provisions of privacy act
>>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>>> copying, distribution, or either dissemination, either whole or partial, is
>>> strictly forbidden except previous formal approval of the named
>>> addressee(s). If you are not the intended recipient, please contact
>>> immediately the sender by telephone, fax or e-mail and delete the
>>> information in this message that has been received in error. The sender
>>> does not give any warranty or accept liability as the content, accuracy or
>>> completeness of sent messages and accepts no responsibility for changes
>>> made after they were sent or for other risks which arise as a result of
>>> e-mail transmission, viruses, etc.
>>>
>>> On Thu, Oct 12, 2017 at 4:34 PM, Alessio Fabiani <
>>> [email protected]> wrote:
>>>
>>>> https://github.com/geoserver/geoserver/pull/2592
>>>>
>>>> Regards,
>>>>
>>>> Alessio Fabiani
>>>>
>>>> ==
>>>> GeoServer Professional Services from the experts! Visit
>>>> http://goo.gl/it488V for more information.
>>>> ==
>>>>
>>>> Ing. Alessio Fabiani
>>>>
>>>> @alfa7691
>>>> Founder/Technical Lead
>>>>
>>>>
>>>> GeoSolutions S.A.S.
>>>> Via di Montramito 3/A
>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>> 55054 Massarosa
>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>> (LU)
>>>> Italy
>>>> phone: +39 0584 962313 <0584%20962313>
>>>> fax: +39 0584 1660272 <0584%20166%200272>
>>>> mob: +39 331 6233686 <331%20623%203686>
>>>>
>>>> http://www.geo-solutions.it
>>>> http://twitter.com/geosolutions_it
>>>>
>>>> -------------------------------------------------------
>>>>
>>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>>
>>>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>>>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>>>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>>>> principi dettati dal D.Lgs. 196/2003.
>>>>
>>>> The information in this message and/or attachments, is intended solely
>>>> for the attention and use of the named addressee(s) and may be confidential
>>>> or proprietary in nature or covered by the provisions of privacy act
>>>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>>>> Code).Any use not in accord with its purpose, any disclosure, reproduction,
>>>> copying, distribution, or either dissemination, either whole or partial, is
>>>> strictly forbidden except previous formal approval of the named
>>>> addressee(s). If you are not the intended recipient, please contact
>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>> information in this message that has been received in error. The sender
>>>> does not give any warranty or accept liability as the content, accuracy or
>>>> completeness of sent messages and accepts no responsibility for changes
>>>> made after they were sent or for other risks which arise as a result of
>>>> e-mail transmission, viruses, etc.
>>>>
>>>> On Thu, Oct 12, 2017 at 3:06 PM, Alessio Fabiani <
>>>> [email protected]> wrote:
>>>>
>>>>> I no one is working on this I can spend some time to do a PR.
>>>>> Maybe if we can just share few ideas on possible solutions so I can
>>>>> move on the right direction.
>>>>> Most of the fixes should be quite straight.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Alessio Fabiani
>>>>>
>>>>> ==
>>>>> GeoServer Professional Services from the experts! Visit
>>>>> http://goo.gl/it488V for more information.
>>>>> ==
>>>>>
>>>>> Ing. Alessio Fabiani
>>>>>
>>>>> @alfa7691
>>>>> Founder/Technical Lead
>>>>>
>>>>>
>>>>> GeoSolutions S.A.S.
>>>>> Via di Montramito 3/A
>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>> 55054 Massarosa
>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>> (LU)
>>>>> Italy
>>>>> phone: +39 0584 962313 <0584%20962313>
>>>>> fax: +39 0584 1660272 <0584%20166%200272>
>>>>> mob: +39 331 6233686 <331%20623%203686>
>>>>>
>>>>> http://www.geo-solutions.it
>>>>> http://twitter.com/geosolutions_it
>>>>>
>>>>> -------------------------------------------------------
>>>>>
>>>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>>>
>>>>> Le informazioni contenute in questo messaggio di posta elettronica e/o
>>>>> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
>>>>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>>>>> principi dettati dal D.Lgs. 196/2003.
>>>>>
>>>>> The information in this message and/or attachments, is intended solely
>>>>> for the attention and use of the named addressee(s) and may be
>>>>> confidential
>>>>> or proprietary in nature or covered by the provisions of privacy act
>>>>> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
>>>>> Code).Any use not in accord with its purpose, any disclosure,
>>>>> reproduction,
>>>>> copying, distribution, or either dissemination, either whole or partial,
>>>>> is
>>>>> strictly forbidden except previous formal approval of the named
>>>>> addressee(s). If you are not the intended recipient, please contact
>>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>>> information in this message that has been received in error. The sender
>>>>> does not give any warranty or accept liability as the content, accuracy or
>>>>> completeness of sent messages and accepts no responsibility for changes
>>>>> made after they were sent or for other risks which arise as a result of
>>>>> e-mail transmission, viruses, etc.
>>>>>
>>>>> On Wed, Oct 11, 2017 at 7:10 PM, Alessio Fabiani <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> In particular:
>>>>>>
>>>>>> 1)
>>>>>> here
>>>>>>
>>>>>> https://github.com/geoserver/geoserver/blob/master/src/restc
>>>>>> onfig/src/main/java/org/geoserver/rest/catalog/AbstractStore
>>>>>> UploadController.java#L109
>>>>>>
>>>>>> ZIP file containing the shapefiles are extracted on a folder named
>>>>>> *$GEOSERVER_DATA_DIR\data\{$workspace}\{$store_name}* without
>>>>>> actually removing the old ones, but only checking for old ZIP files with
>>>>>> the same name
>>>>>>
>>>>>>
>>>>>> 2)
>>>>>> here
>>>>>>
>>>>>> https://github.com/geoserver/geoserver/blob/master/src/restc
>>>>>> onfig/src/main/java/org/geoserver/rest/catalog/AbstractStore
>>>>>> UploadController.java#L114
>>>>>>
>>>>>> becomes the Directory, since a ShapefileDirectoryDataStore is
>>>>>> created. however the uploadedFile will never becomes null
>>>>>>
>>>>>> 3)
>>>>>> here
>>>>>>
>>>>>> https://github.com/geoserver/geoserver/blob/master/src/restc
>>>>>> onfig/src/main/java/org/geoserver/rest/catalog/AbstractStore
>>>>>> UploadController.java#L130
>>>>>>
>>>>>> nevertheless "files" already contains the correct list of shapefiles
>>>>>> (and ancillary files) I uploaded, those are cleared and replace with
>>>>>> uploadedFile
>>>>>> which is now the directory containing all data uploaded until now
>>>>>>
>>>>>> 4)
>>>>>> here
>>>>>>
>>>>>> https://github.com/geoserver/geoserver/blob/master/src/restc
>>>>>> onfig/src/main/java/org/geoserver/rest/catalog/DataStoreFile
>>>>>> Controller.java#L232
>>>>>>
>>>>>> the folder is returned and the ShapefileDataStoreFactory created
>>>>>>
>>>>>> 5)
>>>>>> finally here
>>>>>>
>>>>>> https://github.com/geoserver/geoserver/blob/master/src/restc
>>>>>> onfig/src/main/java/org/geoserver/rest/catalog/DataStoreFile
>>>>>> Controller.java#L416
>>>>>>
>>>>>> for a reason that I really could not understand, unless the parameter
>>>>>> configure
>>>>>> is equal "all" (meaning that I want everything to be configured
>>>>>> again), it configures just the first featureTypeName of the list.
>>>>>>
>>>>>> But even worse, previously
>>>>>>
>>>>>> https://github.com/geoserver/geoserver/blob/master/src/restc
>>>>>> onfig/src/main/java/org/geoserver/rest/catalog/DataStoreFile
>>>>>> Controller.java#L348
>>>>>>
>>>>>> it reloads ALL the tables on the DB. Such method may be potentially
>>>>>> dangerous when this folder contains hundreds of uploaded shapefiles
>>>>>> and/or
>>>>>> very huge ones.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Alessio Fabiani
>>>>>>
>>>>>> ==
>>>>>> GeoServer Professional Services from the experts! Visit
>>>>>> http://goo.gl/it488V for more information.
>>>>>> ==
>>>>>>
>>>>>> Ing. Alessio Fabiani
>>>>>>
>>>>>> @alfa7691
>>>>>> Founder/Technical Lead
>>>>>>
>>>>>>
>>>>>> GeoSolutions S.A.S.
>>>>>> Via di Montramito 3/A
>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>> 55054 Massarosa
>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>> (LU)
>>>>>> Italy
>>>>>> phone: +39 0584 962313 <0584%20962313>
>>>>>> fax: +39 0584 1660272 <0584%20166%200272>
>>>>>> mob: +39 331 6233686 <331%20623%203686>
>>>>>>
>>>>>> http://www.geo-solutions.it
>>>>>> http://twitter.com/geosolutions_it
>>>>>>
>>>>>> -------------------------------------------------------
>>>>>>
>>>>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>>>>
>>>>>> Le informazioni contenute in questo messaggio di posta elettronica
>>>>>> e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate.
>>>>>> Il
>>>>>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>>>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>>>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>>>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>>>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
>>>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>>>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>>>>>> principi dettati dal D.Lgs. 196/2003.
>>>>>>
>>>>>> The information in this message and/or attachments, is intended
>>>>>> solely for the attention and use of the named addressee(s) and may be
>>>>>> confidential or proprietary in nature or covered by the provisions of
>>>>>> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data
>>>>>> Protection Code).Any use not in accord with its purpose, any disclosure,
>>>>>> reproduction, copying, distribution, or either dissemination, either
>>>>>> whole
>>>>>> or partial, is strictly forbidden except previous formal approval of the
>>>>>> named addressee(s). If you are not the intended recipient, please contact
>>>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>>>> information in this message that has been received in error. The sender
>>>>>> does not give any warranty or accept liability as the content, accuracy
>>>>>> or
>>>>>> completeness of sent messages and accepts no responsibility for changes
>>>>>> made after they were sent or for other risks which arise as a result of
>>>>>> e-mail transmission, viruses, etc.
>>>>>>
>>>>>> On Wed, Oct 11, 2017 at 6:20 PM, Alessio Fabiani <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi Andrea,
>>>>>>> currently I tested only version 2.12.x, but I guess the same happens
>>>>>>> on 2.11 and 2.13.
>>>>>>>
>>>>>>> Cannot say if that worked before. I noticed this behavior while
>>>>>>> trying to update the GeoServer version for GeoNode from 2.10 to 2.12. On
>>>>>>> GeoNode there were no changes on the REST calls, and we never faced such
>>>>>>> issue previously. Therefore I'm guessing it is something new.
>>>>>>>
>>>>>>> Currently I did debug of the code step by step and tried almost all
>>>>>>> combinations, but at this stage there is no way to add just one
>>>>>>> shapefile
>>>>>>> to a DB DataStore without modifying the code. If I correctly interpreted
>>>>>>> the logic, I guess it must be deeply revised. There something very
>>>>>>> strange
>>>>>>> on the way the workflow is managed on this use case.
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Alessio Fabiani
>>>>>>>
>>>>>>> ==
>>>>>>> GeoServer Professional Services from the experts! Visit
>>>>>>> http://goo.gl/it488V for more information.
>>>>>>> ==
>>>>>>>
>>>>>>> Ing. Alessio Fabiani
>>>>>>>
>>>>>>> @alfa7691
>>>>>>> Founder/Technical Lead
>>>>>>>
>>>>>>>
>>>>>>> GeoSolutions S.A.S.
>>>>>>> Via di Montramito 3/A
>>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>>> 55054 Massarosa
>>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>>> (LU)
>>>>>>> Italy
>>>>>>> phone: +39 0584 962313 <0584%20962313>
>>>>>>> fax: +39 0584 1660272 <0584%20166%200272>
>>>>>>> mob: +39 331 6233686 <331%20623%203686>
>>>>>>>
>>>>>>> http://www.geo-solutions.it
>>>>>>> http://twitter.com/geosolutions_it
>>>>>>>
>>>>>>> -------------------------------------------------------
>>>>>>>
>>>>>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>>>>>
>>>>>>> Le informazioni contenute in questo messaggio di posta elettronica
>>>>>>> e/o nel/i file/s allegato/i sono da considerarsi strettamente
>>>>>>> riservate. Il
>>>>>>> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
>>>>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>>>>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>>>>> darcene notizia via e-mail e di procedere alla distruzione del messaggio
>>>>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio
>>>>>>> stesso,
>>>>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>>>>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
>>>>>>> principi dettati dal D.Lgs. 196/2003.
>>>>>>>
>>>>>>> The information in this message and/or attachments, is intended
>>>>>>> solely for the attention and use of the named addressee(s) and may be
>>>>>>> confidential or proprietary in nature or covered by the provisions of
>>>>>>> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data
>>>>>>> Protection Code).Any use not in accord with its purpose, any disclosure,
>>>>>>> reproduction, copying, distribution, or either dissemination, either
>>>>>>> whole
>>>>>>> or partial, is strictly forbidden except previous formal approval of the
>>>>>>> named addressee(s). If you are not the intended recipient, please
>>>>>>> contact
>>>>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>>>>> information in this message that has been received in error. The sender
>>>>>>> does not give any warranty or accept liability as the content, accuracy
>>>>>>> or
>>>>>>> completeness of sent messages and accepts no responsibility for changes
>>>>>>> made after they were sent or for other risks which arise as a result of
>>>>>>> e-mail transmission, viruses, etc.
>>>>>>>
>>>>>>> On Wed, Oct 11, 2017 at 6:13 PM, Andrea Aime <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Alessio,
>>>>>>>> looking at the mail I have a hint of what you're talking about, but
>>>>>>>> it would be useful to add some details to
>>>>>>>> understand where to look into.
>>>>>>>> What exact REST request are you running? (important as there are
>>>>>>>> several ways to create a store, like,
>>>>>>>> I would believe that pointing the code to a existing folder is not
>>>>>>>> the same as uploading a zip file, and so on).
>>>>>>>>
>>>>>>>> Also, is the issue happening on 2.12, and is it unique to it?
>>>>>>>> (since the REST API has been rewritten there)
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>> Andrea
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Oct 10, 2017 at 3:53 PM, Alessio Fabiani <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Dear all,
>>>>>>>>> while testing REST upload of resources against a PostGIS DataStore
>>>>>>>>> I faced on a quite severe issue on DataStoreFileController.
>>>>>>>>>
>>>>>>>>> If you look at the code workflow, in the unlucky case you would
>>>>>>>>> like to add a shapefile to a datastore, this methods either fails if
>>>>>>>>> the
>>>>>>>>> shapefile is not the first file on the target folder or reloads the
>>>>>>>>> whole
>>>>>>>>> directory into the database. The biggest issue is that there's no way
>>>>>>>>> to
>>>>>>>>> force a cleanup of this directory, named like the datasotre, thus
>>>>>>>>> ending up
>>>>>>>>> reloading also very old shapefiles.
>>>>>>>>>
>>>>>>>>> How exactly this method is ment to be used? What the use case for
>>>>>>>>> its implementation? It would be possible at least to add an option to
>>>>>>>>> take
>>>>>>>>> into account just the files I'm uploading instead of forcing me to
>>>>>>>>> reload
>>>>>>>>> the whole directory?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Alessio Fabiani
>>>>>>>>>
>>>>>>>>> ==
>>>>>>>>> GeoServer Professional Services from the experts! Visit
>>>>>>>>> http://goo.gl/it488V for more information.
>>>>>>>>> ==
>>>>>>>>>
>>>>>>>>> Ing. Alessio Fabiani
>>>>>>>>>
>>>>>>>>> @alfa7691
>>>>>>>>> Founder/Technical Lead
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> GeoSolutions S.A.S.
>>>>>>>>> Via di Montramito 3/A
>>>>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>>>>> 55054 Massarosa
>>>>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>>>>> (LU)
>>>>>>>>> Italy
>>>>>>>>> phone: +39 0584 962313 <+39%200584%20962313>
>>>>>>>>> fax: +39 0584 1660272 <+39%200584%20166%200272>
>>>>>>>>> mob: +39 331 6233686 <+39%20331%20623%203686>
>>>>>>>>>
>>>>>>>>> http://www.geo-solutions.it
>>>>>>>>> http://twitter.com/geosolutions_it
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------
>>>>>>>>>
>>>>>>>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>>>>>>>
>>>>>>>>> Le informazioni contenute in questo messaggio di posta elettronica
>>>>>>>>> e/o nel/i file/s allegato/i sono da considerarsi strettamente
>>>>>>>>> riservate. Il
>>>>>>>>> loro utilizzo è consentito esclusivamente al destinatario del
>>>>>>>>> messaggio,
>>>>>>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate
>>>>>>>>> questo
>>>>>>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>>>>>>> darcene notizia via e-mail e di procedere alla distruzione del
>>>>>>>>> messaggio
>>>>>>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio
>>>>>>>>> stesso,
>>>>>>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo,
>>>>>>>>> od
>>>>>>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario
>>>>>>>>> ai
>>>>>>>>> principi dettati dal D.Lgs. 196/2003.
>>>>>>>>>
>>>>>>>>> The information in this message and/or attachments, is intended
>>>>>>>>> solely for the attention and use of the named addressee(s) and may be
>>>>>>>>> confidential or proprietary in nature or covered by the provisions of
>>>>>>>>> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
>>>>>>>>> Data
>>>>>>>>> Protection Code).Any use not in accord with its purpose, any
>>>>>>>>> disclosure,
>>>>>>>>> reproduction, copying, distribution, or either dissemination, either
>>>>>>>>> whole
>>>>>>>>> or partial, is strictly forbidden except previous formal approval of
>>>>>>>>> the
>>>>>>>>> named addressee(s). If you are not the intended recipient, please
>>>>>>>>> contact
>>>>>>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>>>>>>> information in this message that has been received in error. The
>>>>>>>>> sender
>>>>>>>>> does not give any warranty or accept liability as the content,
>>>>>>>>> accuracy or
>>>>>>>>> completeness of sent messages and accepts no responsibility for
>>>>>>>>> changes
>>>>>>>>> made after they were sent or for other risks which arise as a result
>>>>>>>>> of
>>>>>>>>> e-mail transmission, viruses, etc.
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------
>>>>>>>>> ------------------
>>>>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>>>>> _______________________________________________
>>>>>>>>> Geoserver-devel mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Andrea Aime
>>>>>>>>
>>>>>>>> ==
>>>>>>>> GeoServer Professional Services from the experts! Visit
>>>>>>>> http://goo.gl/it488V for more information.
>>>>>>>> ==
>>>>>>>>
>>>>>>>> Ing. Andrea Aime
>>>>>>>> @geowolf
>>>>>>>> Technical Lead
>>>>>>>>
>>>>>>>> GeoSolutions S.A.S.
>>>>>>>> Via di Montramito 3/A
>>>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>>>> 55054 Massarosa
>>>>>>>> <https://maps.google.com/?q=Via+di+Montramito+3/A+55054+%C2%A0Massarosa&entry=gmail&source=g>
>>>>>>>> (LU)
>>>>>>>> phone: +39 0584 962313 <0584%20962313>
>>>>>>>> fax: +39 0584 1660272 <0584%20166%200272>
>>>>>>>> mob: +39 339 8844549 <339%20884%204549>
>>>>>>>>
>>>>>>>> http://www.geo-solutions.it
>>>>>>>> http://twitter.com/geosolutions_it
>>>>>>>>
>>>>>>>> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>>>>>>>>
>>>>>>>> Le informazioni contenute in questo messaggio di posta elettronica
>>>>>>>> e/o nel/i file/s allegato/i sono da considerarsi strettamente
>>>>>>>> riservate. Il
>>>>>>>> loro utilizzo è consentito esclusivamente al destinatario del
>>>>>>>> messaggio,
>>>>>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
>>>>>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>>>>>> darcene notizia via e-mail e di procedere alla distruzione del
>>>>>>>> messaggio
>>>>>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio
>>>>>>>> stesso,
>>>>>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
>>>>>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario
>>>>>>>> ai
>>>>>>>> principi dettati dal D.Lgs. 196/2003.
>>>>>>>>
>>>>>>>> The information in this message and/or attachments, is intended
>>>>>>>> solely for the attention and use of the named addressee(s) and may be
>>>>>>>> confidential or proprietary in nature or covered by the provisions of
>>>>>>>> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
>>>>>>>> Data
>>>>>>>> Protection Code).Any use not in accord with its purpose, any
>>>>>>>> disclosure,
>>>>>>>> reproduction, copying, distribution, or either dissemination, either
>>>>>>>> whole
>>>>>>>> or partial, is strictly forbidden except previous formal approval of
>>>>>>>> the
>>>>>>>> named addressee(s). If you are not the intended recipient, please
>>>>>>>> contact
>>>>>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>>>>>> information in this message that has been received in error. The sender
>>>>>>>> does not give any warranty or accept liability as the content,
>>>>>>>> accuracy or
>>>>>>>> completeness of sent messages and accepts no responsibility for
>>>>>>>> changes
>>>>>>>> made after they were sent or for other risks which arise as a result of
>>>>>>>> e-mail transmission, viruses, etc.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
> --
>
> Regards,
>
> Andrea Aime
>
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054 Massarosa (LU)
> phone: +39 0584 962313 <+39%200584%20962313>
> fax: +39 0584 1660272 <+39%200584%20166%200272>
> mob: +39 339 8844549 <+39%20339%20884%204549>
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel