Skip to content

Conversation

@shacharPash
Copy link
Contributor

No description provided.

@shacharPash shacharPash changed the title Add Graph Module Add Redis Graph Commands Oct 18, 2022
@shacharPash shacharPash marked this pull request as ready for review November 3, 2022 12:32
@shacharPash shacharPash requested review from AviAvni and slorello89 and removed request for AviAvni November 3, 2022 12:32
@chayim chayim requested review from leibale and sazzad16 November 10, 2022 07:22
Copy link
Member

@slorello89 slorello89 left a comment

Choose a reason for hiding this comment

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

The way that transactions work in here is really wonky.

StackExchange.Redis has this odd pattern where you:

  1. Create the transaction
  2. Execute "async" methods against the transaction
  3. Close the transaction
  4. pull the results from the tasks that were spawned by the async methods in step 2

this leads to a really weird issue where if you await a non-closing task before the closing task, you'll just deadlock your thread - which isn't great.

Here we have:

  1. Create the transaction
  2. Execute 'async' methods against the transaction
  3. close the transaction
  4. pull the results from an array of results that is returned when closing out the transaction.

In this model there isn't a great way to correlate the request to the result, and we've lied to the user with those async tasks as the tasks they got back have no deferred result which is really odd. Perhaps those methods shouldn't be called "Async" and shouldn't return any task, maybe "enqueue" or something with some way to correlate the command to the result.

{
var results = new ResultSet[_pendingTasks.Count];

var success = _transaction.Execute(); // TODO: Handle false (which means the transaction didn't succeed.)
Copy link
Member

Choose a reason for hiding this comment

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

if false this really should throw an aggregation of the error's that came out of the transaction.

/// <summary>
/// Allows for executing a series of RedisGraph queries as a single unit.
/// </summary>
public class RedisGraphTransaction // TODO: check if needed
Copy link
Member

Choose a reason for hiding this comment

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

check what?

@shacharPash shacharPash requested review from slorello89 and removed request for leibale and sazzad16 November 15, 2022 10:24
@@ -0,0 +1,172 @@
// using System.Text;
Copy link
Member

Choose a reason for hiding this comment

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

remove this.

@slorello89
Copy link
Member

LGTM 👍

Copy link
Member

@slorello89 slorello89 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@shacharPash shacharPash merged commit 55fe3d6 into master Nov 22, 2022
@shacharPash shacharPash deleted the AddGraphCommands branch November 22, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants