Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Re-arranging tabs while acquisition is in the process of fetching tabs can cause pricing loss #383

Closed
ericsium opened this issue Dec 31, 2016 · 4 comments
Assignees
Labels

Comments

@ericsium
Copy link
Collaborator

ericsium commented Dec 31, 2016

Currenly acquisition takes a 'snapshot' of the tabs names and related tab index values when it fetches the first tab. It then proceeds to attempt to fetch all the remaining user tabs by their respective index. The snapshotted index is used to associate with the tab name as the tab fetch itself doesn't include the tab name.

The problem is that we can only fetch a limited amount of tabs at once before being throttled so we need to wait 1 minutes between tab fetches occasionally. GGG API issues can cause throttling to occur more frequently as well. If a user happens to move a tab during this wait period the tab index changes and our previous snapshot of indicies/tab names is no longer valid. Future fetches will then effectively incorrectly associate tab names and items.

Since users have so many tabs in standard leauges it's much more likely this problem would be exposed there.

Pricing information in particular is sensitive to tab name as we hash in the name of the tab as part of the buyout object. When this condition happens the items which previosly had a buyout now have a differnt hash due to being associated with the wrong tab name and the orphaned buyout object will be garbage collected.

To fix this we must detect when this condition happens and abort the update.

@xyzz
Copy link
Owner

xyzz commented Dec 31, 2016

I think what we should do is implement support for ggg-provided unique item hash, migrate all buyouts, and not remove buyouts for items anymore.

@ericsium
Copy link
Collaborator Author

The thing with item ID's - how sure are we that we can trust GGG to never change them? It would be good to hear something official about this as It would be pretty disruptive if GGG decided they needed to change the item ID's in the future at some point as everyone would certainly lose their pricing data.

Other then that concern, I agree that doing that in combination with aborting if tab sequences are changed during update should provide much better pricing stability.

@xyzz
Copy link
Owner

xyzz commented Dec 31, 2016

It's true, they've changed them once.

I originally implemented it in a way that never removes buyouts exactly because I expected GGG api to misbehave, so returning empty stash tab should not delete buyouts (even though it is GGG's fault).

@ericsium
Copy link
Collaborator Author

ericsium commented Jan 7, 2017

I've got a patch coming soon to address this problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants