Skip to content

Commit

Permalink
Merge branch 'redis:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
altanozlu authored Nov 28, 2024
2 parents 7653e75 + 06ed4fa commit af2f813
Show file tree
Hide file tree
Showing 26 changed files with 5,217 additions and 393 deletions.
10 changes: 8 additions & 2 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,14 @@ func (s clusterslots) parse(tls bool) map[string]group {
}

func getClusterSlots(c conn, timeout time.Duration) clusterslots {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
var ctx context.Context
var cancel context.CancelFunc
if timeout > 0 {
ctx, cancel = context.WithTimeout(context.Background(), timeout)
defer cancel()
} else {
ctx = context.Background()
}
v := c.Version()
if v < 8 {
return clusterslots{reply: c.Do(ctx, cmds.SlotCmd), addr: c.Addr(), ver: v}
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ services:
image: redis:5-alpine
ports:
- "6356:6379"
compat-redisearch:
image: redis/redis-stack:7.4.0-v0
ports:
- "6381:6379"
sentinel:
image: redis:7.4-alpine
entrypoint:
Expand Down
59 changes: 50 additions & 9 deletions hack/cmds/commands_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@
"TAG",
"NUMERIC",
"GEO",
"VECTOR"
"VECTOR",
"GEOSHAPE"
]
},
{
Expand All @@ -182,14 +183,6 @@
"optional": true,
"multiple": true,
"block": [
{
"name": "withsuffixtrie",
"type": "enum",
"enum": [
"WITHSUFFIXTRIE"
],
"optional": true
},
{
"name": "sortable",
"type": "block",
Expand Down Expand Up @@ -253,6 +246,30 @@
"enum": [
"CASESENSITIVE"
]
},
{
"name": "WITHSUFFIXTRIE",
"type": "enum",
"optional": true,
"enum": [
"WITHSUFFIXTRIE"
]
},
{
"name": "INDEXEMPTY",
"type": "enum",
"optional": true,
"enum": [
"INDEXEMPTY"
]
},
{
"name": "INDEXMISSING",
"type": "enum",
"optional": true,
"enum": [
"INDEXMISSING"
]
}
]
}
Expand Down Expand Up @@ -1092,6 +1109,14 @@
"ASC",
"DESC"
]
},
{
"name": "withcount",
"type": "enum",
"optional": true,
"enum": [
"WITHCOUNT"
]
}
]
},
Expand Down Expand Up @@ -1315,6 +1340,14 @@
"type": "integer",
"command": "MAX",
"optional": true
},
{
"name": "withcount",
"type": "enum",
"enum": [
"WITHCOUNT"
],
"optional": true
}
]
},
Expand Down Expand Up @@ -1422,6 +1455,14 @@
}
]
},
{
"name": "addscores",
"type": "enum",
"enum": [
"ADDSCORES"
],
"optional": true
},
{
"name": "dialect",
"type": "integer",
Expand Down
Loading

0 comments on commit af2f813

Please sign in to comment.