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

added params support to id seek #1164

Merged
merged 5 commits into from
Jun 25, 2020
Merged

added params support to id seek #1164

merged 5 commits into from
Jun 25, 2020

Conversation

DvirDukhan
Copy link
Collaborator

No description provided.

@DvirDukhan DvirDukhan marked this pull request as ready for review June 23, 2020 19:24
@DvirDukhan DvirDukhan requested a review from swilly22 June 23, 2020 19:24
swilly22
swilly22 previously approved these changes Jun 24, 2020
Comment on lines 27 to 29
// In case of parameter, evalute it so it will in-place become constant.
if(AR_EXP_IsParameter(lhs)) AR_EXP_Evaluate(lhs, NULL);
if(AR_EXP_IsParameter(rhs)) AR_EXP_Evaluate(rhs, NULL);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we change this to:

AR_EXP_Evaluate(lhs, NULL);
AR_EXP_Evaluate(rhs, NULL);

Ignoring errors ?

* The function returns true if it managed to compact the expression.
* The runtime flag indicates if there can be runtime evaluations (parameters)
* The val pointer is out-by-ref returned computation. */
bool AR_EXP_ReduceToScalar(AR_ExpNode *root, bool runtime, SIValue *val);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if runtime is the best name here, as optimisation time isn't really runtime.
maybe rename to reduce_params ?

*id = SI_GET_NUMERIC(operand->constant);
// Make sure ID is compared to a constant int64.
SIValue val = SI_NullVal();
bool constant_id = AR_EXP_ReduceToScalar(expr, true, &val);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't AR_EXP_ReduceToScalar set val to NULL as default ?

*id = SI_GET_NUMERIC(operand->constant);
// Make sure ID is compared to a constant int64.
SIValue val = SI_NullVal();
bool constant_id = AR_EXP_ReduceToScalar(expr, true, &val);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename constant_id to reduced

@@ -218,11 +218,11 @@ static bool _validateInExpression(AR_ExpNode *exp) {
assert(exp->op.child_count == 2);

AR_ExpNode *list = exp->op.children[1];
// In case the array is a parameter such as "WHERE x IN $arr", evaluate the parameter for in-place replacement.
SIValue listValue = SI_NullVal();
bool constant_list = AR_EXP_ReduceToScalar(list, true, &listValue);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please rename constant_list to reduced

if(AR_EXP_IsParameter(list)) AR_EXP_Evaluate(list, NULL);
if(list->operand.type != AR_EXP_CONSTANT || list->operand.constant.type != T_ARRAY) return false;
if(!constant_list || SI_TYPE(listValue) != T_ARRAY) return false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think checking if SI_TYPE(listValue) != T_ARRAY should be enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I prefer this for my peace of mind.

@@ -172,10 +172,17 @@ AR_ExpNode *AR_EXP_NewParameterOperandNode(const char *param_name) {
* e.g. MINUS(X) where X is a constant number will be reduced to
* a single node with the value -X
* PLUS(MINUS(A), B) will be reduced to a single constant: B-A. */
bool AR_EXP_ReduceToScalar(AR_ExpNode *root) {
bool AR_EXP_ReduceToScalar(AR_ExpNode *root, bool runtime, SIValue *val) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think val should be set to NULL on entry and set to scalar only of the entire expression was reduced,
I know this is a recursive function, but you might want to introduce a static bool _ AR_EXP_ReduceToScalar function to help out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

setting to NullVal

@swilly22 swilly22 merged commit bc609c3 into master Jun 25, 2020
@swilly22 swilly22 deleted the optimizations_with_params branch June 25, 2020 07:30
swilly22 added a commit that referenced this pull request Jun 25, 2020
* Update op_node_by_id_seek.c

Fix, wrong variable assignment.

* Update value.c

removed.boolean switch

* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094)

* Fixed compiler typo (#1097)

Paragraph on OSX build should read "CXX" instead of "CPP".

* Union bugfixes (#1052)

* Improve scoping rules in validating UNION queries

* Bugfix in uniquing column containing both nodes and edges

* Add flow tests

* PR fixes

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

* throw runtime-error on missing query parameters (#1100)

* removed query parameters annotations (#1101)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

* changed RediSearch version to 1.8 (#1103)

* changed RediSearch version to 1.8

* added flag for redisearch GC

* moved env var setting to memcheck script

* Update memcheck.sh

* fixed misplaced env var setting

* fixed bad command format

* flag in circle ci instead of makefile

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* docker file for centos (#1104)

* Skip NULL-valued properties in bulk loader (#1108)

* Skip NULL-valued properties in bulk loader

* Address PR comment, add missing logic in edge procesing

* RED-4187: update RS version to 5.6.0 and run on Centos os on CI process (#1112)

* Perform one-time transpose of traversed matrices (#1111)

* Autoformat

* WIP

* No-op transpose nodes, working with memory leaks

* WIP freeing and simplifying

* WIP

* Fix false positives on leak checking

* Autoformat unit test file

* Replace transpose op nodes with operands

* Prune unused eval conditions, improve function logic

* Fix unit tests

* Partially address PR comments

* PR fixes continued

* PR fixes

* Add handling for transpose operations in ApplyTranspose

* Fix disconnect sequence in ApplyTranspose on operations

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Omp thread configuration (#1118)

* Expose OMP_THREAD_COUNT as a module-level configuration

* Update documentation

* Improve comments

* Refactor logic for module-level configuration

* Fix PR comments

* Enforce that module args are key-value pairs

* PR fixes

* PR fixes

* redisearch 1.8.1 (#1121)

* add doc action

* remove internal folders

* Add configurations to menu

* Update deploy-docs.yaml (#1126)

* Update deploy-docs.yaml (#1131)

* Null PR for triggering docs (#1132)

* Remove deploy-docs (moved to action) (#1140)

* update min_redis_pack_version to 5.4.14 (#1142)

* Transposed relations (#877)

* maintain transposed matrices

* Updated unit-tests

* Post-rebase fixes

* Revert FetchOperands changes

* WIP

* Unit test fixes

* Simplify transpose matrix assignment

* Add configuration param

* Access config global to check for transposed matrices

* Update documentation

* Update graph logic to handle the absence of transposed matrices

* Fix unit tests

* Exit with error on unhandled parameter

* Add flow test

* Simplify fetch operands logic

* Add abstraction layer to check for transposed relations

* Partially address PR comments

* Update FetchOperands logic

* Address PR comments

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update index.md (#1143)

* Exec plan cache (#1117)

* added single threaded LRU cache

* changed LRU logic. WIP after design review

* fixed PR comments

* removed DS_Store

* changed pr comments for test priority queue

* fixed priority_queue.h and linked_list.h comments. wip

* fixed linked_list.c comments. wip

* wip

* Revert change to queue item sizing

* WIP

* wip

* Remove linear insertion flag, simplify linked list

* Refactor cache data structure implementations

* Start adding logic for populating cache

* added cache size config param

* added cache API for graph context

* did some clean ups

* clone logic

* done refactoring. unit tests pass

* unit tests pass

* wip

* wip

* test suit pass

* test suit pass

* fixed some memory leaks

* wip

* added cache tests

* review ready

* fixed PR comments

* fixed PR comments

* fixed PR comments

* after rebase

* fixed PR comments

* fixing memory leaks

* trying to avoid race

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* memceck race handling (#1152)

* removed time.sleep from tests teardown

* added async delete config

* fixed config and makefile

* moved memcheck to compiler flag

* Avoid flushing matrices by maintaining separate transpose edge arrays (#1148)

* Avoid flushing matrices by maintaining separate edge arrays in transposes

* Properly update transpose matrices on single-edge deletion

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* version bump

* fixed parameterized index scan (#1157)

* added params support for indexed array lookup (#1159)

* removed RedisModule_ReplyWithError from ast validations (#1160)

* removed RedisModule_ReplyWithError from ast validations

* removed char** reason from functions

* refactored query_ctx for varargs

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* added params support to id seek (#1164)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

* validate graph schema is encoded (#1168)

* validate graph schema is encoded

* fixed PR comment

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Resolve race in accessing/updating attribute maps (#1165)

* Protect critical region of reading/updating GraphContext attributes

* Improve lock coverage

* Don't heap-alloc attribute ID values

* Change to QueryCtx lock check

* Bulk insert deadlock fix

* Remove FindOrAddAttribute calls from critical region

* Revert changes to QueryCtx

* Revert changes to Graph

* Introduce new rwlock for attribute mapping

* Only lookup property ID once

* Fix unit tests

* Fix possible duplicate entry

* Always retrieve attribute value in critical region

* Address PR comments

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Move index iterator construction to first Consume call (#1169)

* Move index iterator construction to first Consume call

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Christoph Zimmermann <40485189+chrisAtRedis@users.noreply.github.com>
Co-authored-by: Omri Ben-Gidon <47712555+omrib1@users.noreply.github.com>
Co-authored-by: Guy Korland <gkorland@gmail.com>
Co-authored-by: Itamar Haber <itamar@redislabs.com>
Co-authored-by: swilly22 <roi@redislabs.com>
DvirDukhan added a commit that referenced this pull request Jul 9, 2020
* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)
swilly22 pushed a commit that referenced this pull request Jul 9, 2020
* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)
DvirDukhan added a commit that referenced this pull request Jul 12, 2020
* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)
swilly22 added a commit that referenced this pull request Jul 12, 2020
* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210)

(cherry picked from commit 386a8e6)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update value.c (#1209)

removed.boolean switch

(cherry picked from commit e5ab233)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* LabelScan with child reads data correctly after reset (#1086) (#1207)

(cherry picked from commit cce2ebb)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Error properly on graph accesses of non-graph keys (#1069) (#1206)

* Error properly on graph accesses of non-graph keys

* Explicitly free QueryCtx on failed delete

* Update cmd_delete.c

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 0cf50df)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* make memcheck rule prints full log for files with leaks (#1072) (#1205)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 135e0bc)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204)

* ReduceScan and ReduceTraversal respect variable scopes

* Fix source lookup

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 29b75d8)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Better compile-time checking for undefined variables (#1063) (#1203)

* Improve AST validations to capture undefined variables

* Propagate errors in nested AR_EXP_Evaluate failures

(cherry picked from commit e62b823)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* add cloud link and NOT conditions unary validation (#1214)

* Guarantee that NOT conditions are unary (#1092) (#1208)

(cherry picked from commit b56f98a)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* link to redis cloud

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

(cherry picked from commit d46c6b6)

* Skip NULL-valued properties in bulk loader (#1108)

* Skip NULL-valued properties in bulk loader

* Address PR comment, add missing logic in edge procesing

(cherry picked from commit b62e802)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

(cherry picked from commit d6d6f8b)

* added params support to id seek (#1164) (#1218)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)

* Move index iterator construction to first Consume call (#1169) (#1219)

* Move index iterator construction to first Consume call

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 7853153)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>
DvirDukhan added a commit that referenced this pull request Jul 13, 2020
* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)
DvirDukhan added a commit that referenced this pull request Jul 13, 2020
* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210)

(cherry picked from commit 386a8e6)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update value.c (#1209)

removed.boolean switch

(cherry picked from commit e5ab233)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* LabelScan with child reads data correctly after reset (#1086) (#1207)

(cherry picked from commit cce2ebb)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Error properly on graph accesses of non-graph keys (#1069) (#1206)

* Error properly on graph accesses of non-graph keys

* Explicitly free QueryCtx on failed delete

* Update cmd_delete.c

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 0cf50df)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* make memcheck rule prints full log for files with leaks (#1072) (#1205)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 135e0bc)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204)

* ReduceScan and ReduceTraversal respect variable scopes

* Fix source lookup

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 29b75d8)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Better compile-time checking for undefined variables (#1063) (#1203)

* Improve AST validations to capture undefined variables

* Propagate errors in nested AR_EXP_Evaluate failures

(cherry picked from commit e62b823)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* add cloud link and NOT conditions unary validation (#1214)

* Guarantee that NOT conditions are unary (#1092) (#1208)

(cherry picked from commit b56f98a)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* link to redis cloud

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

(cherry picked from commit d46c6b6)

* Skip NULL-valued properties in bulk loader (#1108)

* Skip NULL-valued properties in bulk loader

* Address PR comment, add missing logic in edge procesing

(cherry picked from commit b62e802)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

(cherry picked from commit d6d6f8b)

* added params support to id seek (#1164) (#1218)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)

* Move index iterator construction to first Consume call (#1169) (#1219)

* Move index iterator construction to first Consume call

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 7853153)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>
DvirDukhan added a commit that referenced this pull request Jul 15, 2020
* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)
DvirDukhan added a commit that referenced this pull request Jul 15, 2020
* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210)

(cherry picked from commit 386a8e6)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update value.c (#1209)

removed.boolean switch

(cherry picked from commit e5ab233)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* LabelScan with child reads data correctly after reset (#1086) (#1207)

(cherry picked from commit cce2ebb)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Error properly on graph accesses of non-graph keys (#1069) (#1206)

* Error properly on graph accesses of non-graph keys

* Explicitly free QueryCtx on failed delete

* Update cmd_delete.c

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 0cf50df)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* make memcheck rule prints full log for files with leaks (#1072) (#1205)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 135e0bc)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204)

* ReduceScan and ReduceTraversal respect variable scopes

* Fix source lookup

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 29b75d8)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Better compile-time checking for undefined variables (#1063) (#1203)

* Improve AST validations to capture undefined variables

* Propagate errors in nested AR_EXP_Evaluate failures

(cherry picked from commit e62b823)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* add cloud link and NOT conditions unary validation (#1214)

* Guarantee that NOT conditions are unary (#1092) (#1208)

(cherry picked from commit b56f98a)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* link to redis cloud

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

(cherry picked from commit d46c6b6)

* Skip NULL-valued properties in bulk loader (#1108)

* Skip NULL-valued properties in bulk loader

* Address PR comment, add missing logic in edge procesing

(cherry picked from commit b62e802)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

(cherry picked from commit d6d6f8b)

* added params support to id seek (#1164) (#1218)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)

* Move index iterator construction to first Consume call (#1169) (#1219)

* Move index iterator construction to first Consume call

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 7853153)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>
swilly22 added a commit that referenced this pull request Jul 15, 2020
* Resolve race in accessing/updating attribute maps (#1165) (#1223)

* Protect critical region of reading/updating GraphContext attributes

* Improve lock coverage

* Don't heap-alloc attribute ID values

* Change to QueryCtx lock check

* Bulk insert deadlock fix

* Remove FindOrAddAttribute calls from critical region

* Revert changes to QueryCtx

* Revert changes to Graph

* Introduce new rwlock for attribute mapping

* Only lookup property ID once

* Fix unit tests

* Fix possible duplicate entry

* Always retrieve attribute value in critical region

* Address PR comments

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit d66affb)

* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210)

(cherry picked from commit 386a8e6)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update value.c (#1209)

removed.boolean switch

(cherry picked from commit e5ab233)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* LabelScan with child reads data correctly after reset (#1086) (#1207)

(cherry picked from commit cce2ebb)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Error properly on graph accesses of non-graph keys (#1069) (#1206)

* Error properly on graph accesses of non-graph keys

* Explicitly free QueryCtx on failed delete

* Update cmd_delete.c

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 0cf50df)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* make memcheck rule prints full log for files with leaks (#1072) (#1205)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 135e0bc)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204)

* ReduceScan and ReduceTraversal respect variable scopes

* Fix source lookup

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 29b75d8)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Better compile-time checking for undefined variables (#1063) (#1203)

* Improve AST validations to capture undefined variables

* Propagate errors in nested AR_EXP_Evaluate failures

(cherry picked from commit e62b823)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* add cloud link and NOT conditions unary validation (#1214)

* Guarantee that NOT conditions are unary (#1092) (#1208)

(cherry picked from commit b56f98a)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* link to redis cloud

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

(cherry picked from commit d46c6b6)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

(cherry picked from commit d6d6f8b)

* added params support to id seek (#1164) (#1218)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)

* Skip NULL-valued properties in bulk loader (#1108) (#1216)

* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210)

(cherry picked from commit 386a8e6)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update value.c (#1209)

removed.boolean switch

(cherry picked from commit e5ab233)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* LabelScan with child reads data correctly after reset (#1086) (#1207)

(cherry picked from commit cce2ebb)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Error properly on graph accesses of non-graph keys (#1069) (#1206)

* Error properly on graph accesses of non-graph keys

* Explicitly free QueryCtx on failed delete

* Update cmd_delete.c

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 0cf50df)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* make memcheck rule prints full log for files with leaks (#1072) (#1205)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 135e0bc)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204)

* ReduceScan and ReduceTraversal respect variable scopes

* Fix source lookup

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 29b75d8)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Better compile-time checking for undefined variables (#1063) (#1203)

* Improve AST validations to capture undefined variables

* Propagate errors in nested AR_EXP_Evaluate failures

(cherry picked from commit e62b823)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* add cloud link and NOT conditions unary validation (#1214)

* Guarantee that NOT conditions are unary (#1092) (#1208)

(cherry picked from commit b56f98a)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* link to redis cloud

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

(cherry picked from commit d46c6b6)

* Skip NULL-valued properties in bulk loader (#1108)

* Skip NULL-valued properties in bulk loader

* Address PR comment, add missing logic in edge procesing

(cherry picked from commit b62e802)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

(cherry picked from commit d6d6f8b)

* added params support to id seek (#1164) (#1218)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

(cherry picked from commit bc609c3)

* Move index iterator construction to first Consume call (#1169) (#1219)

* Move index iterator construction to first Consume call

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 7853153)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* add GTM (#1237)

(cherry picked from commit 8cc66d8)

* fixed graph context creation

* Update index on change (#1225)

* WIP

* Fix compile errors

* Only update indexes when necessary

* refined update entity update eval

* WIP

* WIP

* Compilation fixes, edge updates

* Add freeing logic

* Update comments

* some minor changes to op_update

* Address PR comments

* Address PR comments

* always get updated node label id

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: DvirDukhan <dvir@redislabs.com>
(cherry picked from commit e712193)

* Update index on change (#1225)

* WIP

* Fix compile errors

* Only update indexes when necessary

* refined update entity update eval

* WIP

* WIP

* Compilation fixes, edge updates

* Add freeing logic

* Update comments

* some minor changes to op_update

* Address PR comments

* Address PR comments

* always get updated node label id

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: DvirDukhan <dvir@redislabs.com>
(cherry picked from commit e712193)

* memceck race handling (#1152)

* removed time.sleep from tests teardown

* added async delete config

* fixed config and makefile

* moved memcheck to compiler flag

(cherry picked from commit b7d0a38)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>
Co-authored-by: Guy Korland <gkorland@gmail.com>
swilly22 added a commit that referenced this pull request Jul 21, 2020
* Update op_node_by_id_seek.c

Fix, wrong variable assignment.

* Update value.c

removed.boolean switch

* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094)

* Fixed compiler typo (#1097)

Paragraph on OSX build should read "CXX" instead of "CPP".

* Union bugfixes (#1052)

* Improve scoping rules in validating UNION queries

* Bugfix in uniquing column containing both nodes and edges

* Add flow tests

* PR fixes

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Bidirectional expand into (#1047)

* wip

* Remove unnecessary iterator

* WIP

* Fix bidirectional ExpandInto, shared edge populating logic

* PR fixes

* Post-rebase fixes

* Fix PR comments

* throw runtime-error on missing query parameters (#1100)

* removed query parameters annotations (#1101)

* do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102)

* changed RediSearch version to 1.8 (#1103)

* changed RediSearch version to 1.8

* added flag for redisearch GC

* moved env var setting to memcheck script

* Update memcheck.sh

* fixed misplaced env var setting

* fixed bad command format

* flag in circle ci instead of makefile

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* docker file for centos (#1104)

* Skip NULL-valued properties in bulk loader (#1108)

* Skip NULL-valued properties in bulk loader

* Address PR comment, add missing logic in edge procesing

* RED-4187: update RS version to 5.6.0 and run on Centos os on CI process (#1112)

* Perform one-time transpose of traversed matrices (#1111)

* Autoformat

* WIP

* No-op transpose nodes, working with memory leaks

* WIP freeing and simplifying

* WIP

* Fix false positives on leak checking

* Autoformat unit test file

* Replace transpose op nodes with operands

* Prune unused eval conditions, improve function logic

* Fix unit tests

* Partially address PR comments

* PR fixes continued

* PR fixes

* Add handling for transpose operations in ApplyTranspose

* Fix disconnect sequence in ApplyTranspose on operations

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Omp thread configuration (#1118)

* Expose OMP_THREAD_COUNT as a module-level configuration

* Update documentation

* Improve comments

* Refactor logic for module-level configuration

* Fix PR comments

* Enforce that module args are key-value pairs

* PR fixes

* PR fixes

* redisearch 1.8.1 (#1121)

* add doc action

* remove internal folders

* Add configurations to menu

* Update deploy-docs.yaml (#1126)

* Update deploy-docs.yaml (#1131)

* Null PR for triggering docs (#1132)

* Remove deploy-docs (moved to action) (#1140)

* update min_redis_pack_version to 5.4.14 (#1142)

* Transposed relations (#877)

* maintain transposed matrices

* Updated unit-tests

* Post-rebase fixes

* Revert FetchOperands changes

* WIP

* Unit test fixes

* Simplify transpose matrix assignment

* Add configuration param

* Access config global to check for transposed matrices

* Update documentation

* Update graph logic to handle the absence of transposed matrices

* Fix unit tests

* Exit with error on unhandled parameter

* Add flow test

* Simplify fetch operands logic

* Add abstraction layer to check for transposed relations

* Partially address PR comments

* Update FetchOperands logic

* Address PR comments

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update index.md (#1143)

* Exec plan cache (#1117)

* added single threaded LRU cache

* changed LRU logic. WIP after design review

* fixed PR comments

* removed DS_Store

* changed pr comments for test priority queue

* fixed priority_queue.h and linked_list.h comments. wip

* fixed linked_list.c comments. wip

* wip

* Revert change to queue item sizing

* WIP

* wip

* Remove linear insertion flag, simplify linked list

* Refactor cache data structure implementations

* Start adding logic for populating cache

* added cache size config param

* added cache API for graph context

* did some clean ups

* clone logic

* done refactoring. unit tests pass

* unit tests pass

* wip

* wip

* test suit pass

* test suit pass

* fixed some memory leaks

* wip

* added cache tests

* review ready

* fixed PR comments

* fixed PR comments

* fixed PR comments

* after rebase

* fixed PR comments

* fixing memory leaks

* trying to avoid race

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* memceck race handling (#1152)

* removed time.sleep from tests teardown

* added async delete config

* fixed config and makefile

* moved memcheck to compiler flag

* Avoid flushing matrices by maintaining separate transpose edge arrays (#1148)

* Avoid flushing matrices by maintaining separate edge arrays in transposes

* Properly update transpose matrices on single-edge deletion

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* fixed parameterized index scan (#1157)

* added params support for indexed array lookup (#1159)

* removed RedisModule_ReplyWithError from ast validations (#1160)

* removed RedisModule_ReplyWithError from ast validations

* removed char** reason from functions

* refactored query_ctx for varargs

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* added params support to id seek (#1164)

* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments

* validate graph schema is encoded (#1168)

* validate graph schema is encoded

* fixed PR comment

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Resolve race in accessing/updating attribute maps (#1165)

* Protect critical region of reading/updating GraphContext attributes

* Improve lock coverage

* Don't heap-alloc attribute ID values

* Change to QueryCtx lock check

* Bulk insert deadlock fix

* Remove FindOrAddAttribute calls from critical region

* Revert changes to QueryCtx

* Revert changes to Graph

* Introduce new rwlock for attribute mapping

* Only lookup property ID once

* Fix unit tests

* Fix possible duplicate entry

* Always retrieve attribute value in critical region

* Address PR comments

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Move index iterator construction to first Consume call (#1169)

* Move index iterator construction to first Consume call

* Address PR comments

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* fix graph creation example (#1171)

* fix graph creation example

* fixed errors in example

* single flow (#1177)

* added explain and profile options as invalid options in redisgraph (#1184)

* added explain and profile options as invalid options in redisgraph query string

* fixed PR comments

* moved tests

* Update Dockerfile (#1188)

* Adding redis cloud pro to quick start

Please hold back merging this PR.  Thanks

* fix typo in anker

* enable search GC (#1194)

* aggregated slowlog should maintain original timestamps (#1199)

* correct link to redis cloud

* Aumation auth moved to be token based (#1192)

* Aumation auth moved to be token based

* Update config.yml

* Update config.yml

* relay on search replace add functionality to delete existing documents (#1226)

* line length 80 (#1227)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* Emit compile time error on creation of undirected edges (#1212)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* redisearch 1.8.2 (#1229)

* redisearch 1.8.2

* linked search cleanup function

* add GTM (#1239)

* Update index on change (#1225)

* WIP

* Fix compile errors

* Only update indexes when necessary

* refined update entity update eval

* WIP

* WIP

* Compilation fixes, edge updates

* Add freeing logic

* Update comments

* some minor changes to op_update

* Address PR comments

* Address PR comments

* always get updated node label id

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: DvirDukhan <dvir@redislabs.com>

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Christoph Zimmermann <40485189+chrisAtRedis@users.noreply.github.com>
Co-authored-by: Omri Ben-Gidon <47712555+omrib1@users.noreply.github.com>
Co-authored-by: Guy Korland <gkorland@gmail.com>
Co-authored-by: Itamar Haber <itamar@redislabs.com>
Co-authored-by: Martin Rauscher <hades32@gmail.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>
pnxguide pushed a commit to CMU-SPEED/RedisGraph that referenced this pull request Mar 22, 2023
* added params support to id seek

* reduce to scalar with runtime

* fixed PR comments

* fixed PR comments
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.

None yet

2 participants