Comments (10)
Hi @akater320,
Following your advice I checked by replacing the DiffFeatureReader constructor with the one that contains also the Filter parameter (in the suggested line 619 of ContentFeatureSource) and it seems that the problem is resolved in what concerns multiply editing actions in Shapefiles (JDBC layers also seem unaffected by this change). That is great!
@akater320 do you have an account in geotools project? If yes would it be possible to create a jira ticket in geotools (https://osgeo-org.atlassian.net/projects/GEOT/issues) describing the problem and possibly also referencing the present issue to justify the problem? Then you can proceed with providing a PR fix on geotools github.
Note: as far s I know, geotools is now in version 21.x which has a lot of changes compared to v19.4 used by udig (also it is probably not under support anymore) but I am sure the problem is still present. Anyway let's propose a fix and we may ask later how we can backport it to v19.x.
from udig-platform.
https://osgeo-org.atlassian.net/projects/GEOT/issues/GEOT-6293
from udig-platform.
This is quite a serious bug. I just check it and indeed the behaviour if you try to edit more than one feature without prior committing the changes is really weird!
It seems also that the issue is present for quite some time, maybe from upgrading to geotools 19.x. I wonder how this got unoticed for such a long time (to be honest I work almost solely with jdbc layers where the problem seems not to be present)!!
@akater320 are you sure that the issue stems from the ContentFeatureStore? Moreover are you aware whether it has been fixed in subsequent geotools versions?
@fgdrf I think we should urgently ask a question about this to the geotools team and request their counsel.
from udig-platform.
Checking a little bit further it seems that we have this issue in udig even in version 2.0.0 that uses geotools 14.1. I had to go 4-5 years back in time that is udig 1.4 and geotools 9.0-M0 to see correct behavior during multiple edits of a shapefile layer!
from udig-platform.
Thanks for confirming.
The problem probably this line:
https://github.com/geotools/geotools/blob/e40158adf59a37d985133184968f251d9a8ff4f8/modules/library/main/src/main/java/org/geotools/data/store/ContentFeatureSource.java#L619
It should be using the constructor with the Filter parameter.
https://github.com/geotools/geotools/blob/e40158adf59a37d985133184968f251d9a8ff4f8/modules/library/main/src/main/java/org/geotools/data/DiffFeatureReader.java#L93
The default filter is Filter.INCLUDE, so queryAdded() will return everything rather than only the features matching the user's query.
https://github.com/geotools/geotools/blob/e40158adf59a37d985133184968f251d9a8ff4f8/modules/library/main/src/main/java/org/geotools/data/DiffFeatureReader.java#L211
from udig-platform.
FYI: You may encounter this issue while testing with ShapeFiles.
geotools/geotools@a26e08b
from udig-platform.
But @akater320 I cannot understand if the problem is indeed where you mention, shouldn't all FeatureSources be affected since this method getReader is final and used by all FeatureSources that inherit from the ContentFeatureSource (that is to say all type of sources)? I.e. I work for some years with JDBCFeatureSources (MySQL) in udig and the problem surely not present there!
from udig-platform.
Excellent point @nprigour
It looks like JDBCFeatureStore delegates read-only operations to JDBCFeatureSource which handles transactions intrinsically.
https://github.com/geotools/geotools/blob/e40158adf59a37d985133184968f251d9a8ff4f8/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCFeatureStore.java#L211
https://github.com/geotools/geotools/blob/e40158adf59a37d985133184968f251d9a8ff4f8/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCFeatureSource.java#L544
JDBCFeatureReader never gets wrapped by a DiffFeatureReader in this block.
https://github.com/geotools/geotools/blob/e40158adf59a37d985133184968f251d9a8ff4f8/modules/library/main/src/main/java/org/geotools/data/store/ContentFeatureSource.java#L616
from udig-platform.
Hi @akater320,
would it be possible to revise the https://osgeo-org.atlassian.net/projects/GEOT/issues/GEOT-6293 jira issue according to what I am proposing in geotools/geotools#2604 (see my latest comment) so that we can proceed with the geotools fix. If you are unable to rename the issue and/or its description, please inform back so that I generate another one and we set the GEOT-6293 as duplicate.
from udig-platform.
The fix for this is being included in GeoTools 22.1.
from udig-platform.
Related Issues (20)
- Context menu in Catalog view differs across entries
- Add-to-active-Map action of view Catalog is not working as expected
- OSM Spatial Toolbox with JGrassTools 0.7.3 are incompatible HOT 2
- Issue compiling uDIg in Eclipse IDE with classpath configuration in module catalog.test
- GitHub action build is failing due to the SpotBugs plugin HOT 3
- Maven profile "coverage" is not working anymore
- provide jfree.eastwood from jfreechart bundle rather than udig.libs bundle HOT 1
- properties layer & wms layer IllegalArgumentException while trying to add WMS-Layer HOT 2
- Exception in Log while opening Properties with right mouse in LayersView
- [Flaky] OnProjectDropActionTest.testPerformAddResource fails sometimes
- Add Data Wizard throws NullPointerException opening File page
- Image Mosaic Tool doesn't show any information
- Add Data Workflow "back" button causes Exception HOT 1
- Replace sys.out by logger HOT 1
- Provide common way for logging
- Possible flaky test AddGeomCommandTest.testRun
- Invocation of java.net.URL.equals(Object), which blocks to do domain name resolution
- uses a map or set of URLs, which can be a performance hog
- Review FilteredTree and FilteredComboTree in org.locationtech.udig.style.sld
- NullPointerException in ShpGeoResourceInfo while executing search in SearchView HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udig-platform.