Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential race condition in OrderCacheService #94

Open
MikeLuDev opened this issue Aug 10, 2022 · 0 comments
Open

Fix potential race condition in OrderCacheService #94

MikeLuDev opened this issue Aug 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@MikeLuDev
Copy link
Member

Describe the bug

Context:

markets_1         | TypeError: Cannot read properties of undefined (reading 'get')
markets_1         |     at OrderCacheService.updateOrder (/usr/app/node_modules/@staratlas/factory/src/marketplace/services/OrderCacheService.ts:169:41)
markets_1         |     at GmOrderbookService.updateOrderInCache (/usr/app/node_modules/@staratlas/factory/src/marketplace/services/GmOrderbookService.ts:192:35)
markets_1         |     at GmOrderbookService.handleOrderModifiedEvent (/usr/app/node_modules/@staratlas/factory/src/marketplace/services/GmOrderbookService.ts:303:10)
markets_1         |     at GmOrderbookService.handleMarketplaceEvent (/usr/app/node_modules/@staratlas/factory/src/marketplace/services/GmOrderbookService.ts:320:14)
markets_1         |     at GmEventService.handleOrderExchanged (/usr/app/node_modules/@staratlas/factory/src/marketplace/services/GmEventService.ts:161:10)
markets_1         |     at /usr/app/node_modules/@project-serum/anchor/src/program/event.ts:110:17
markets_1         |     at Array.forEach (<anonymous>)
markets_1         |     at /usr/app/node_modules/@project-serum/anchor/src/program/event.ts:106:26
markets_1         |     at EventParser.parseLogs (/usr/app/node_modules/@project-serum/anchor/src/program/event.ts:182:9)
markets_1         |     at /usr/app/node_modules/@project-serum/anchor/src/program/event.ts:103:27

To Reproduce

  • Attempt to update an order which doesn't already exist in the cache service

Expected behavior

  • This should be gracefully handled
@MikeLuDev MikeLuDev added the bug Something isn't working label Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant