licoffe / POE-Stash-indexer-NG

High performance Path of Exile stash indexer
MIT License
43 stars 12 forks source link

Skipping stashes with NULL accountNames creates "ghost" items #12

Closed Superchicken closed 7 years ago

Superchicken commented 7 years ago

When processing json, stashes with a NULL accountName are skipped (here).

    // If there is a valid accountName value
    if ( array.HasMember( "accountName" ) && !array["accountName"].IsNull()) {
        assert(array["accountName"].IsString());
        account_name = array["accountName"].GetString();
    } else {
        // If not, skip this stash tab
        continue;
    }

A NULL accountName indicates that the stash no longer exists/is removed, as Novynn mentioned here: https://www.reddit.com/r/pathofexiledev/comments/54b20b/empty_accountcharacter_names/

If I'm interpreting correctly, the relevant stash+item records should be removed from the database, because the items in that tab should also no longer exist.

licoffe commented 7 years ago

Hi Deepak, you're definitely right :) Thank you for reporting! I'll post a patch to fix this soon.

licoffe commented 7 years ago

Just published a patch to remove Items and Stashes entries for which the stashId is linked to an empty account name.