Bug 578618 - MarkerAttributeMap rewrite (threadsafe+performance)
Summary: MarkerAttributeMap rewrite (threadsafe+performance)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.23   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.24 M1   Edit
Assignee: Jörg Kubitz CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2022-02-07 08:05 EST by Jörg Kubitz CLA
Modified: 2022-03-28 07:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Kubitz CLA 2022-02-07 08:05:38 EST
split of from bug 450663
MarkerAttributeMap is not threadsave and slow (but needlessly memory efficent)
Comment 2 Andrey Loskutov CLA 2022-03-25 02:53:15 EDT
This causes multiple test fails in debug and PDE tests.

Debug tests fail due NPE on re-setting marker attributes (that passes null to Marker.setAttributes(), which is valid).

https://download.eclipse.org/eclipse/downloads/drops4/I20220324-1800/testresults/html/org.eclipse.jdt.debug.tests_ep424I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11.html

java.lang.NullPointerException
at org.eclipse.core.internal.resources.MarkerAttributeMap.putAll(MarkerAttributeMap.java:102)
at org.eclipse.core.internal.resources.MarkerAttributeMap.copy(MarkerAttributeMap.java:85)
at org.eclipse.core.internal.resources.MarkerAttributeMap.setAttributes(MarkerAttributeMap.java:80)
at org.eclipse.core.internal.resources.MarkerInfo.setAttributes(MarkerInfo.java:160)
at org.eclipse.core.internal.resources.Marker.setAttributes(Marker.java:336)
at org.eclipse.debug.ui.actions.ImportBreakpointsOperation.run(ImportBreakpointsOperation.java:215)
at org.eclipse.jdt.debug.tests.breakpoints.ImportBreakpointsTest.testBreakpointImportOverwrite(ImportBreakpointsTest.java:140)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)

PDE tests fail with DNF in org.eclipse.pde.ui.tests.build.properties.BuildPropertiesValidationTest, the reason there is not clear yet (no NPE). Reverting https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/190487  fixes that too.

Please note, as of today, resources repo is hosted on github: https://github.com/eclipse-platform/eclipse.platform.resources
Comment 3 Jörg Kubitz CLA 2022-03-25 04:34:02 EDT
(In reply to Andrey Loskutov from comment #2)
> Debug tests fail due NPE on re-setting marker attributes (that passes null
> to Marker.setAttributes(), which is valid).


thanks for notification!.
Uh i am not used to github. The commit just pushed without CI?
its now:

https://github.com/eclipse-platform/eclipse.platform.resources/commit/b1a1e69a248a26cc45e826ecf8c507eafc86e2b3

Where is the CI? i feel lost.
Comment 4 Andrey Loskutov CLA 2022-03-25 04:41:09 EDT
(In reply to Jörg Kubitz from comment #3)
> (In reply to Andrey Loskutov from comment #2)
> > Debug tests fail due NPE on re-setting marker attributes (that passes null
> > to Marker.setAttributes(), which is valid).
> 
> 
> thanks for notification!.
> Uh i am not used to github. The commit just pushed without CI?
> its now:
> 
> https://github.com/eclipse-platform/eclipse.platform.resources/commit/
> b1a1e69a248a26cc45e826ecf8c507eafc86e2b3
> 
> Where is the CI? i feel lost.

You should not push directly to master branch!

Here is the current attempt to describe the workflow:
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/master/DeveloperGuide.md

Here is the mailing list discussing it:
https://www.eclipse.org/lists/platform-dev/msg03473.html
Comment 5 Jörg Kubitz CLA 2022-03-25 04:48:19 EDT
(In reply to Andrey Loskutov from comment #4)
> Here is the current attempt to describe the workflow:
> https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/
> master/DeveloperGuide.md

Why is that under "eclipse.platform.releng.aggregator"  - i still do not even know what releng or aggregator is or how this is related to resources.
Comment 6 Andrey Loskutov CLA 2022-03-25 05:31:17 EDT
(In reply to Jörg Kubitz from comment #3)
> (In reply to Andrey Loskutov from comment #2)
> > Debug tests fail due NPE on re-setting marker attributes (that passes null
> > to Marker.setAttributes(), which is valid).
> 
> 
> thanks for notification!.
> Uh i am not used to github. The commit just pushed without CI?
> its now:
> 
> https://github.com/eclipse-platform/eclipse.platform.resources/commit/
> b1a1e69a248a26cc45e826ecf8c507eafc86e2b3


Note: this fixes NPE in org.eclipse.jdt.debug.tests.breakpoints.ImportBreakpointsTest but does not fix fail & hang in org.eclipse.pde.ui.tests.build.properties.BuildPropertiesValidationTest
Comment 7 Andrey Loskutov CLA 2022-03-25 15:24:02 EDT
(In reply to Andrey Loskutov from comment #6)
> Note: this fixes NPE in
> org.eclipse.jdt.debug.tests.breakpoints.ImportBreakpointsTest but does not
> fix fail & hang in
> org.eclipse.pde.ui.tests.build.properties.BuildPropertiesValidationTest

The fix for PDE troubles is: https://github.com/eclipse-platform/eclipse.platform.resources/pull/5
Comment 8 Andrey Loskutov CLA 2022-03-28 07:33:15 EDT
(In reply to Andrey Loskutov from comment #7)
> (In reply to Andrey Loskutov from comment #6)
> > Note: this fixes NPE in
> > org.eclipse.jdt.debug.tests.breakpoints.ImportBreakpointsTest but does not
> > fix fail & hang in
> > org.eclipse.pde.ui.tests.build.properties.BuildPropertiesValidationTest
> 
> The fix for PDE troubles is:
> https://github.com/eclipse-platform/eclipse.platform.resources/pull/5

Tests pass now.