-
Notifications
You must be signed in to change notification settings - Fork 26
Purging a folder does nothing. #23
Comments
Because it bugged me, I've been working a fix. Almost there, but my analysis showed that while I solved the ability to purge a specified folder from the trash, I still possibly problem in that emptying the trash could leave dangling items in the database: it currently isn't doing a recursive delete, only a first-level. Ran out of time this morning, will make further progress tonight or tomorrow unless I hear that this issue has already been solved! :D |
The packet handler in your first comment is truly not used, and Cassandra inventory is able to purge. There was an erroneous protection for purge added to mysql towards the end and we never fixed it because we migrated. You've probably figured this out by now, but just thought i'd chime in. |
I beg to differ on the point that this function isn't called: that's how I found it; I placed a breakpoint in So in shotgun scattering more debug statements, breakpoints not working on the deep side of polymorphic calls for some reason, I found that Just before I posted the second message above I'd been having to build the several layers of middleware code that connects |
What's more I just replicated the bug on the live InWorldz grid. Here's how to test:
If step 8 shows the "New Folder", then the bug is still in effect. Replicated with the following setup:
Side note: I'm not sure why I'm in this region, it's just where I happened to be when I logged in. If you have a better place for me to do testing, please let me know! |
Purging a single item and purging the contents of an entire folder are two different operations and two different bugs in this case. However, considering that people can change outfits, I know that single links can be purged, that's why I'm scrutinizing and questioning exactly what is happening in your tests. I'll need to replicate this. From what I remember I thought the empty trash bug was an overzealous security test for mysql. You can indeed empty your trash on cassandra. So you may have found a different bug. |
Oh wait.. Maybe im misunderstanding this bug. I thought the problem on mysql was that you couldn't empty the trash. Is this simply about removing single folders out of the trash itself? |
Right now it's both. At the start I'd not realized how separated the codepaths are. Live grid: can empty trash, cannot purge individual folder; Halcyon on MySQL: cannot do either. However I reiterate that the code paths I've followed don't get to storage-implementation-specific stuff until much later - assuming I've been following them right. It's been hard to keep a map in my head while learning it. I also think I found a third, more insidious, bug. This one would be not user-facing: it would simply result in disconnected inventory. You might try running the Cassandra equivalent of the following SQL against your database to make sure you've not got disconnected inventory: /* Verify that all items in inventory have parent folders. */
SELECT * FROM inventoryitems invi WHERE invi.parentFolderID not in (SELECT folderID FROM inventoryfolders);
/* Verify that all folders in inventory have parent folders - excepting the root folders of course. */
SELECT * FROM inventoryfolders invf WHERE invf.parentFolderID not in (SELECT folderID FROM inventoryfolders) AND invf.parentFolderID != "00000000-0000-0000-0000-000000000000"; Both queries shouldn't return any rows. If they do, the results are the items that should have been purged but were not. I've run out of time again, but I think in the morning I'll trace and verify this last bug in a new branch where I can see things as they stand: if it does exist it's a worse problem as it's hidden from normal view. |
There are protections in the cassandra code against assigning null parent IDs. The same probably isnt true for the MySQL code. |
Ah, but this wouldn't be null parent IDs: it would be that the folder was deleted but the items and folders in it were not. Hence the |
In Cassandra storage an item cannot exist without its folder. The folder is actually something called a supercolumn and the items are stored along with it |
I've forked this issue into its constituent parts to hopefully alleviate some of the confusion and conflation. |
And I finally come around to why I wanted to be able to compile and run this on my Linux machine - not having a working Windows install I needed to run Halcyon under Linux to debug a problem we've been having on our grid for quite some time now. This issue report is about that bug - now that I've conclusively found the root of the problem.
The user's view of the problem: Purging an inventory folder from the Trash causes the folder to disappear, but it shows back up in the Trash after a relog.
The developer's view of the problem: The line that does the work has been commented out with "will fix in the next patch" - see https://github.com/InWorldz/halcyon/blame/master/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs#L1504
It's high time for that patch from whomever commented that line out! :P
On an aside: this is the bug that Vin thought was because we are running on MySQL instead of Cassandra. However the smoking gun indicates that this will happen on all grids no matter the storage implementation. BTW: I complement whomever designed the migration process. Also whomever designed the abstraction layers: while it was a LOT of work to follow the logic through all the indirection and polymorphism, it's a nicely extensible system.
The text was updated successfully, but these errors were encountered: