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

LT-4926: Potential corrupted snapshot #498

Merged
merged 7 commits into from
Mar 21, 2024

Conversation

lykke-vashetsin
Copy link

No description provided.

Comment on lines 65 to 68
var latestLastModified = currentOrders.Any()
? currentOrders.Max(x => x.LastModified)
: (DateTime?)null;
var ordersHistory = await _ordersHistoryRepository.GetLastSnapshot(tradingEngineSnapshot.Timestamp, latestLastModified);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var latestLastModified = currentOrders.Any()
? currentOrders.Max(x => x.LastModified)
: (DateTime?)null;
var ordersHistory = await _ordersHistoryRepository.GetLastSnapshot(tradingEngineSnapshot.Timestamp, latestLastModified);
var latestOrder = currentOrders.MaxBy(x => x.LastModified);
var ordersHistory = await _ordersHistoryRepository.GetLastSnapshot(tradingEngineSnapshot.Timestamp, latestOrder?.LastModified);

Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
MarginTrading.Backend 3% 7% 596
MarginTrading.Backend.Core 65% 58% 1508
MarginTrading.SqlRepositories 0% 0% 469
MarginTrading.AzureRepositories 4% 36% 197
MarginTrading.Contract 0% 100% 38
MarginTrading.Backend.Contracts 34% 25% 582
MarginTrading.Backend.Core.Mappers 0% 0% 4
MarginTrading.Common 16% 16% 406
MarginTrading.Backend.Services 44% 38% 3279
Summary 36% (5831 / 15977) 34% (1465 / 4306) 7079

@lykke-vashetsin lykke-vashetsin merged commit 0948591 into master Mar 21, 2024
1 check passed
@lykke-vashetsin lykke-vashetsin deleted the LT-4926-potentially-corupted-snapshot branch March 21, 2024 09:44
@gponomarev-lykke gponomarev-lykke restored the LT-4926-potentially-corupted-snapshot branch March 29, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants