Bug 453676 - PDOM files are not being deleted after a project is deleted.
Summary: PDOM files are not being deleted after a project is deleted.
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.5   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-30 18:07 EST by Sumonto Ghosh CLA
Modified: 2020-09-04 15:25 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sumonto Ghosh CLA 2014-11-30 18:07:32 EST
PDOM files are not deleted after a project is deleted.
Version: Kepler Service Release 2
Build id: 20140224-0627
Comment 1 Szymon Ptaszkiewicz CLA 2014-12-01 04:54:27 EST
What are PDOM files and how do you delete the project?
Comment 2 Sumonto Ghosh CLA 2014-12-01 13:28:39 EST
(In reply to Szymon Ptaszkiewicz from comment #1)
> What are PDOM files and how do you delete the project?

PDOM files are index files for a project.
I right-click on the project (under project explorer) and select delete.

Thanks
Comment 3 Szymon Ptaszkiewicz CLA 2014-12-02 04:46:11 EST
(In reply to Sumonto Ghosh from comment #2)
> (In reply to Szymon Ptaszkiewicz from comment #1)
> > What are PDOM files and how do you delete the project?
> 
> PDOM files are index files for a project.

And who or which plugin creates those index files? What are they needed for? I'm asking because the team owning the plugin which create PDOM files should investigate first and we need find the right team to do that.
Comment 4 Sumonto Ghosh CLA 2014-12-02 12:55:51 EST
(In reply to Szymon Ptaszkiewicz from comment #3)
> (In reply to Sumonto Ghosh from comment #2)
> > (In reply to Szymon Ptaszkiewicz from comment #1)
> > > What are PDOM files and how do you delete the project?
> > 
> > PDOM files are index files for a project.
> 
> And who or which plugin creates those index files? What are they needed for?
> I'm asking because the team owning the plugin which create PDOM files should
> investigate first and we need find the right team to do that.

Thanks Szymon for helping.
PDOM files are centric to Eclipse and not specific to any plugin.
Sergey Prigogin would know more about PDOM files. I have also referenced a diff bug in the same domain.

Thanks.
----------------------------------------------------------------------
On Behalf Of Sergey Prigogin
Sent: Sunday, November 30, 2014 12:01 PM
Subject: Re: [Bug 154563] Bindings and File entries are not removed from the PDOM when corressponding source elements are deleted (implement B-tree delete)

The PDOM file is supposed to be deleted when the project is deleted. If it is not deleted for you, please file a new bug since https://bugs.eclipse.org/bugs/show_bug.cgi?id=154563 is about a different issue.

-sergey
----------------------------------------------------------------------
Comment 5 Szymon Ptaszkiewicz CLA 2014-12-02 13:03:34 EST
Thanks for the answer. It seems that PDOM files are known to the CDT guys. Moving to the CDT team for their comment because I don't see anything Platform specific here.
Comment 6 Sergey Prigogin CLA 2014-12-02 13:23:11 EST
Please provide steps to reproduce the problem.
Comment 7 Sumonto Ghosh CLA 2014-12-02 14:18:56 EST
(In reply to Sergey Prigogin from comment #6)
> Please provide steps to reproduce the problem.

I don't have exact steps however the following would be fairly close.

Create Multiple C/C++ projects. (Approx 4)
With 2000+ files
Close a few projects.
Close Eclipse
Add different projects
Delete closed projects
.metadata\.plugins\org.eclipse.cdt.core\*.pdom
Comment 8 Sergey Prigogin CLA 2014-12-02 15:20:06 EST
(In reply to Sumonto Ghosh from comment #7)

The simpler steps you can come up with, the more likely the problem is going to be fixed.
Comment 9 Sumonto Ghosh CLA 2014-12-02 16:52:12 EST
(In reply to Sergey Prigogin from comment #8)
> (In reply to Sumonto Ghosh from comment #7)
> 
> The simpler steps you can come up with, the more likely the problem is going
> to be fixed.

The easiest would be:
1. Create 2 projects with 2000+ files (you could try with lesser)
2. It is ok if these projects don't build, 
   Project type is 'make file project with existing code'
3. Close one of them 
4. Close Eclipse and re-open
5. Delete the project which was closed.
6. The pdom file is still there.

thanks.
Comment 10 Doug Schaefer CLA 2014-12-02 17:38:00 EST
I don't think it matters how many files are in the project. I seem to recall this being an issue when deleting closed projects. Since they aren't open, we don't know that they're CDT projects so we don't know to delete the PDOM.
Comment 11 Sergey Prigogin CLA 2014-12-02 17:46:19 EST
(In reply to Doug Schaefer from comment #10)
> I don't think it matters how many files are in the project. I seem to recall
> this being an issue when deleting closed projects. Since they aren't open,
> we don't know that they're CDT projects so we don't know to delete the PDOM.

This issue can be solved by moving PDOM files to the directory obtained by calling IProject.getWorkingLocation(String). This directory is deleted by the platform whenever the project is deleted.
Comment 12 Sumonto Ghosh CLA 2014-12-12 16:55:28 EST
Any updates?

Thanks.
Comment 13 Doug Schaefer CLA 2014-12-15 16:23:15 EST
Not from me. Just waiting for someone to contribute a fix for this. Not sure users will appreciate all their projects reindexing when the get it though.
Comment 14 Sergey Prigogin CLA 2015-01-12 14:29:17 EST
(In reply to Sergey Prigogin from comment #11)
> This issue can be solved by moving PDOM files to the directory obtained by
> calling IProject.getWorkingLocation(String). This directory is deleted by
> the platform whenever the project is deleted.

It looks like moving PDOM files to the working location directory of the project is far from trivial, since it requires synchronous closing of PDOM. Synchronous closing opens a whole can of worms in terms of performance and possible deadlocks.
Comment 15 Sumonto Ghosh CLA 2015-08-10 14:47:16 EDT
Any updates, or do you need more logs from me?

Thanks.
Comment 16 Sumonto Ghosh CLA 2015-08-13 18:02:46 EDT
(In reply to Sergey Prigogin from comment #14)
> (In reply to Sergey Prigogin from comment #11)
> > This issue can be solved by moving PDOM files to the directory obtained by
> > calling IProject.getWorkingLocation(String). This directory is deleted by
> > the platform whenever the project is deleted.
> 
> It looks like moving PDOM files to the working location directory of the
> project is far from trivial, since it requires synchronous closing of PDOM.
> Synchronous closing opens a whole can of worms in terms of performance and
> possible deadlocks.

Hi Sergey,
It seems the thread is not moving, is there any way you could help?

Thanks.
Comment 17 Mario Charest CLA 2017-11-14 12:17:24 EST
Neon CDT 9.2.1  Problem still present, after a few month working with same workspace, turns out 8G of diskspace was being wasted.