Skip to content

fix problem causing deadlock while copying features between the same shapefile layer#261

Merged
fgdrf merged 1 commit into
locationtech:masterfrom
nprigour:CopyFeatures_sameLayer_fix
Jan 9, 2018
Merged

fix problem causing deadlock while copying features between the same shapefile layer#261
fgdrf merged 1 commit into
locationtech:masterfrom
nprigour:CopyFeatures_sameLayer_fix

Conversation

@nprigour

@nprigour nprigour commented Jan 7, 2018

Copy link
Copy Markdown
Contributor

fix for problem described in issue #260.

It seems that corresponding feature iterator was never closed for the copied feature collection and the maintained read locks caused problem when trying a write lock was attempted during commit time.

Signed-off-by: Nikolaos Pringouris nprigour@gmail.com

same shapefile layer

Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
@nprigour

nprigour commented Jan 8, 2018

Copy link
Copy Markdown
Contributor Author

The present pull request seems to address also the following locationtech bug

@fgdrf

fgdrf commented Jan 9, 2018

Copy link
Copy Markdown
Contributor

Thanks for providing this patch! Going to test copy & paste within the same layer today ..

@fgdrf fgdrf self-requested a review January 9, 2018 05:12
@fgdrf fgdrf added this to the uDig-2.0.0 milestone Jan 9, 2018
queryAttributes.putAll(FeatureUtils.createAttributeMapping(sourceSchema, targetSchema));
Set<String> properties = new HashSet(queryAttributes.values());
return new DefaultQuery(sourceSchema.getName().getLocalPart(), filter, properties
return new Query(sourceSchema.getName().getLocalPart(), filter, properties

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It the switch from DefaultQuery to Query related to the bugfix or just a cleanup here?

@nprigour nprigour Jan 9, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just cleanup since DefaultQuery has been marked as deprecated and synonymous to plain Query class

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested context menu in map panel with right mouse -> copy (of selected feature) and pased it on map ✔️
tested also to copy more than one feature ✔️
copy in map-panel and paste onto layer works as expected ✔️

Thanks again for fixing this issue!

@fgdrf fgdrf merged commit acd64a3 into locationtech:master Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants