question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updates are not pushing to the server just the inserts

See original GitHub issue

I have detected an important issue while modifying an existing record and pushing to the server. The steps as follows:

  1. I create a record on client.
  2. Save the record
  3. Push the changes

The issue seems to be related to the operations records being lost.

private async Task _SaveModifyOperations<T>(T item, T oldItem) where T : NubeTable, new()
{
    var operations = await _changeTracker.TrackModifyAsync(oldItem, item).ConfigureAwait(false);
    if (!await _dataStore.AddOperationsAsync(operations.ToArray()).ConfigureAwait(false))
    {
        throw new StoreOperationFailedException($"Could not save modify operations for item {item.Id}");
    }

    await _RemoveObsoleteOperationsAfterModifyAsync(operations).ConfigureAwait(false);
}

On after this line, ALL the operations inserted at AddOperationsAsync simply get deleted:

await _RemoveObsoleteOperationsAfterModifyAsync(operations).ConfigureAwait(false);

So, when Pushing the records, none is found on the operations table.

I removed the line and it seems to work but not sure if the code was there for a specific reason.

Please advise @stefffdev, thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
stefffdevcommented, Nov 6, 2020

SourceLink would be the best solution for that I guess, but I haven’t added it yet, I’ll create a issue for integrating it!

Other than that you would have to download the source code and use references to the projects directly instead of using the nugets.

0reactions
juanogcxcommented, Nov 6, 2020

That’s great news. Thanks for your quick and great support!

On another topic, a newbie question about nuget+github integration. Could you please advise me how can I debug the source code but still using the nuget packages? I was checking that there’s a “SourceLink” library from MS but I can’t make it work, or is not enabled on your project. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

INSERT & UPDATE not working all of sudden
Hi There,. I have a weired problem going on one of my SQL Server 2000 database where other databases are working fine on...
Read more >
SQL update working not insert
So what I actually did is delete the data I was updating. The first attempt 0 updates and all inserts and it worked...
Read more >
What could be preventing updates and inserts to a table ...
It seems to be running with no issues, except that it isn't doing anything or ending. This is the same if it's only...
Read more >
Code for exec SQL Insert, Add, or updates is not working
I have a web server (PleskHosting Windows) and have created a MS SQL DB. I have a page that lists records in the...
Read more >
PSOS, Insert from URL, Webdirect have all stopped working
PSOS and Insert From URL are no longer working. Webdirect is not working either, except on our public facing server in the DMZ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found