Upgrading redis 5 to 6
Breaking5.4.1 → 6.0.0Breaking4Platform2New12Changed1Fixed2Other4
BreakingUpgrade verdict
4 breaking changes and 2 platform requirement changes.
In plain terms
- The client now uses a newer, more efficient way to talk to Redis by default. Most apps see no difference, but code that reads GEO coordinates will now get decimal numbers instead of strings.
- In the cluster gem, some commands now run on all masters instead of one node, and some return combined results. This changes what those commands return.
- If your code treats GEO coordinates as text, it will now receive numbers instead.
- In cluster mode these commands may now be routed differently, so check your usage.
Must act Top 5 of 6 that need code or config changes
Ruby requirement changed in 6.0.0: >= 2.6.0 → >= 3.2.0.
What you must change
Breaking4
The client now speaks RESP3 by default; pass protocol: 2 to keep RESP2, and GEO coordinates are returned as Float.
protocolIn redis-clustering, commands route by server-declared command tips, changing SLOWLOG, LATENCY RESET and FUNCTION command behavior across masters.
SLOWLOG GETSLOWLOG LENLATENCY RESETFUNCTION LOADFUNCTION DELETEFUNCTION FLUSHFUNCTION RESTOREFCALLGEO coordinates are now returned as Float values instead of strings; pass protocol: 2 to keep string values.
protocolCluster users relying on single-node behavior of SLOWLOG, LATENCY and FUNCTION commands should review the routing changes.
SLOWLOGLATENCYFUNCTIONPlatform2
Requires Ruby 3.2 or newer, previously 2.7/2.6; Bundler keeps older Rubies on the 5.4.x series.
Requires Ruby 3.2+; applications on older Rubies keep resolving to redis 5.4.x.
API changes
Generated by DepDelta from published Ruby source. Not mixed with prose notes.
- added:
method Redis.himport_discard(_) - added:
method Redis.himport_discard_all() - added:
method Redis.himport_prepare(_, *) - added:
method Redis.himport_set(_, _, *)
- removed:
method Client.ensure_connected(retryable: …) - changed:
static method Client.config(**) → static method Client.config(protocol: …, **) - changed:
static method Client.sentinel(**) → static method Client.sentinel(protocol: …, **) - added:
const LibIdentity.INVALID_CHARS - added:
const LibIdentity.LIB_NAME - added:
const LibIdentity.MARKER - added:
const LibIdentity.OWN_INFO - added:
const LibIdentity.OWN_PREFIX - added:
const LibIdentity.SEPARATOR - added:
method Client.protocol() - added:
method Distributed.blmovem(_, _, _, _, timeout: …, count: …, exactly: …, order: …) - added:
method Distributed.geoadd(_, *, **) - added:
method Distributed.geodist(_, _, _, _ = …) - added:
method Distributed.geohash(_, _) - added:
method Distributed.geopos(_, _) - added:
method Distributed.georadius(*, **) - added:
method Distributed.georadiusbymember(*, **) - added:
method Distributed.geosearch(_, **) - added:
method Distributed.geosearchstore(_, _, **) - added:
method Distributed.hexpire(_, _, *) - added:
method Distributed.himport_discard(_) - added:
method Distributed.himport_discard_all() - added:
method Distributed.himport_prepare(_, *) - added:
method Distributed.himport_set(_, _, *) - added:
method Distributed.hpexpire(_, _, *, nx: …, xx: …, gt: …, lt: …) - added:
method Distributed.hpttl(_, *) - added:
method Distributed.hscan(_, _, **) - added:
method Distributed.hscan_each(_, **) - added:
method Distributed.hstrlen(_, _) - added:
method Distributed.httl(_, *) - added:
method Distributed.json_arrappend(_, _, *, **) - added:
method Distributed.json_arrindex(_, _, _, **) - added:
method Distributed.json_arrinsert(_, _, _, *, **) - added:
method Distributed.json_arrlen(_, _ = …) - added:
method Distributed.json_arrpop(_, _ = …, _ = …, **) - added:
method Distributed.json_arrtrim(_, _, _, _) - added:
method Distributed.json_clear(_, _ = …) - added:
method Distributed.json_debug_memory(_, _ = …) - added:
method Distributed.json_del(_, _ = …) - added:
method Distributed.json_forget(_, _ = …) - added:
method Distributed.json_get(_, *, **) - added:
method Distributed.json_merge(_, _, _, **) - added:
method Distributed.json_mget(*, _, **) - added:
method Distributed.json_mset(*) - added:
method Distributed.json_numincrby(_, _, _) - added:
method Distributed.json_objkeys(_, _ = …) - added:
method Distributed.json_objlen(_, _ = …) - added:
method Distributed.json_set(_, _, _, **) - added:
method Distributed.json_strappend(_, _, _, **) - added:
method Distributed.json_strlen(_, _ = …) - added:
method Distributed.json_toggle(_, _) - added:
method Distributed.json_type(_, _ = …) - added:
method Distributed.lmovem(_, _, _, _, count: …, exactly: …, order: …) - added:
method Distributed.sdiffcard(*, limit: …) - added:
method Distributed.sunioncard(*, approx: …, limit: …) - added:
method LibIdentity.connection_prelude() - added:
module LibIdentity - added:
property Subscription.callbacks: reader - added:
static method Client.resp3_unsupported?(_) - added:
static method LibIdentity.driver_info(_ = …) - added:
static method LibIdentity.ours?(_) - added:
static method LibIdentity.setinfo_commands(_)
- changed:
method Geo.geoadd(_, *) → method Geo.geoadd(_, *, nx: …, xx: …, ch: …) - changed:
method Streams.xadd(_, _, approximate: …, maxlen: …, minid: …, nomkstream: …, id: …) → method Streams.xadd(_, _, approximate: …, maxlen: …, minid: …, limit: …, nomkstream: …, id: …) - changed:
method Streams.xread(_, _, count: …, block: …) → method Streams.xread(_, _, count: …, max_count: …, max_size: …, block: …) - changed:
method Streams.xreadgroup(_, _, _, _, count: …, block: …, noack: …) → method Streams.xreadgroup(_, _, _, _, count: …, max_count: …, max_size: …, block: …, noack: …) - added:
const Json.NumincrbyNormalize - added:
const Json.TypeNormalize - added:
const Search.DEFAULT_DIALECT - added:
method Geo.geosearch(_, frommember: …, fromlonlat: …, byradius: …, bybox: …, sort: …, count: …, count_any: …, withcoord: …, withdist: …, withhash: …) - added:
method Geo.geosearchstore(_, _, frommember: …, fromlonlat: …, byradius: …, bybox: …, sort: …, count: …, count_any: …, storedist: …) - added:
method Hashes.hexpire(_, _, *) - added:
method Hashes.himport_discard(_) - added:
method Hashes.himport_discard_all() - added:
method Hashes.himport_prepare(_, *) - added:
method Hashes.himport_set(_, _, *) - added:
method Hashes.hpexpire(_, _, *, nx: …, xx: …, gt: …, lt: …) - added:
method Hashes.hpttl(_, *) - added:
method Hashes.httl(_, *) - added:
method Json.json_get(_, *, raw: …) - added:
method Json.json_mset(*, raw: …) - added:
method Json.json_set(_, _, _, nx: …, xx: …, raw: …) - added:
method Lists.blmovem(_, _, _, _, timeout: …, count: …, exactly: …, order: …) - added:
method Lists.lmovem(_, _, _, _, count: …, exactly: …, order: …) - added:
method Search.create_index(_, _, storage_type: …, prefix: …, stopwords: …, max_text_fields: …, skip_initial_scan: …, definition: …, **) - added:
method Search.ft_aggregate(_, _, *) - added:
method Search.ft_aliasadd(_, _) - added:
method Search.ft_aliasdel(_) - added:
method Search.ft_aliaslist(_) - added:
method Search.ft_aliasupdate(_, _) - added:
method Search.ft_alter(_, _) - added:
method Search.ft_config_get(_) - added:
method Search.ft_config_set(_, _) - added:
method Search.ft_create(_, _, _ = …, prefix: …, stopwords: …, max_text_fields: …, skip_initial_scan: …, definition: …, temporary: …, no_term_offsets: …, no_highlight: …, no_field_flags: …, no_term_frequencies: …, **) - added:
method Search.ft_cursor_del(_, _) - added:
method Search.ft_cursor_read(_, _) - added:
method Search.ft_dictadd(_, *) - added:
method Search.ft_dictdel(_, *) - added:
method Search.ft_dictdump(_) - added:
method Search.ft_dropindex(_, delete_documents: …) - added:
method Search.ft_explain(_, _) - added:
method Search.ft_hybrid_search(_, query:, combine_method: …, post_processing: …, params_substitution: …, timeout: …, cursor: …, **) - added:
method Search.ft_info(_) - added:
method Search.ft_profile(_, *) - added:
method Search.ft_search(_, _, **) - added:
method Search.ft_spellcheck(_, _, distance: …, include: …, exclude: …) - added:
method Search.ft_sugadd(_, _, _, _ = …) - added:
method Search.ft_sugdel(_, _) - added:
method Search.ft_sugget(_, _, _ = …) - added:
method Search.ft_suglen(_) - added:
method Search.ft_syndump(_) - added:
method Search.ft_synupdate(_, _, *, skip_initial_scan: …) - added:
method Search.ft_tagvals(_, _) - added:
method Sets.sdiffcard(*, limit: …) - added:
method Sets.sunioncard(*, approx: …, limit: …) - added:
module Json - added:
module Search
- added:
class AggregateRequest - added:
class AggregateResult - added:
class Asc - added:
class CombineResultsMethod - added:
class Cursor - added:
class Desc - added:
class Document - added:
class Field - added:
class GeoField < Field - added:
class GeoShapeField < Field - added:
class HybridCursorQuery - added:
class HybridFilter - added:
class HybridPostProcessingConfig - added:
class HybridQuery - added:
class HybridResult - added:
class HybridSearchQuery - added:
class HybridVsimQuery - added:
class Index - added:
class IndexDefinition - added:
class NumericField < Field - added:
class Predicate - added:
class PredicateCollection - added:
class Query - added:
class RangePredicate < Predicate - added:
class Reducers - added:
class Schema - added:
class SchemaDefinition - added:
class SearchResult - added:
class SortbyField - added:
class TagEqualityPredicate < Predicate - added:
class TagField < Field - added:
class TextField < Field - added:
class TextMatchPredicate < Predicate - added:
class VectorField < Field - added:
class VectorFieldDefinition - added:
const CombinationMethods.LINEAR - added:
const CombinationMethods.RRF - added:
const GeoShapeField.FLAT - added:
const GeoShapeField.SPHERICAL - added:
const IndexType.HASH - added:
const IndexType.JSON - added:
const Predicate.TAG_ESCAPE_PATTERN - added:
const Predicate.TAG_SPECIAL_CHARACTERS - added:
const Predicate.TEXT_ESCAPE_PATTERN - added:
const Predicate.TEXT_SPECIAL_CHARACTERS - added:
const VectorSearchMethods.KNN - added:
const VectorSearchMethods.RANGE - added:
constructor AggregateRequest(_ = …, with_cursor: …, cursor_count: …, cursor_max_idle: …, dialect: …) - added:
constructor AggregateResult(_, cursor: …) - added:
constructor Asc(_) - added:
constructor CombineResultsMethod(_, **) - added:
constructor Cursor(_) - added:
constructor Desc(_) - added:
constructor Document(_, attributes: …, score: …, payload: …) - added:
constructor Field(_, _, _ = …, **) - added:
constructor GeoField(_, _ = …, **) - added:
constructor GeoShapeField(_, _ = …, **) - added:
constructor HybridCursorQuery(count: …, max_idle: …) - added:
constructor HybridFilter(_) - added:
constructor HybridPostProcessingConfig() - added:
constructor HybridQuery(_, _) - added:
constructor HybridResult(rows: …, total: …, warnings: …, execution_time: …, search_cursor: …, vsim_cursor: …) - added:
constructor HybridSearchQuery(_, scorer: …, yield_score_as: …) - added:
constructor HybridVsimQuery(vector_field_name:, vector_data:, vsim_search_method: …, vsim_search_method_params: …, filter: …, yield_score_as: …) - added:
constructor Index(_, _, _, _, prefix: …, stopwords: …) - added:
constructor IndexDefinition(prefix: …, filter: …, language_field: …, language: …, score_field: …, score: …, payload_field: …, index_type: …) - added:
constructor NumericField(_, _ = …, **) - added:
constructor Predicate(_) - added:
constructor PredicateCollection(_) - added:
constructor Query(_ = …) - added:
constructor RangePredicate(_, _, _) - added:
constructor Reducers(_, *, alias_name: …) - added:
constructor Schema(_ = …) - added:
constructor SchemaDefinition() - added:
constructor SearchResult(_, _, warnings: …) - added:
constructor SortbyField(_, asc: …) - added:
constructor TagEqualityPredicate(_, _) - added:
constructor TagField(_, _ = …, **) - added:
constructor TextField(_, _ = …, **) - added:
constructor TextMatchPredicate(_, _, raw: …) - added:
constructor VectorField(_, _, _ = …, **) - added:
constructor VectorFieldDefinition(_) - added:
method AggregateRequest.add_scores(add_scores: …) - added:
method AggregateRequest.apply(_) - added:
method AggregateRequest.dialect(_) - added:
method AggregateRequest.filter(_) - added:
method AggregateRequest.group_by(_, *) - added:
method AggregateRequest.limit(_, _) - added:
method AggregateRequest.load(*) - added:
method AggregateRequest.sort_by(*, max: …) - added:
method AggregateRequest.to_redis_args() - added:
method AggregateResult.[](_) - added:
method AggregateResult.each() - added:
method AggregateResult.empty?() - added:
method AggregateResult.length() - added:
method AggregateResult.size() - added:
method CombineResultsMethod.args() - added:
method Cursor.build_args() - added:
method Document.==(_) - added:
method Document.[](_) - added:
method Document.hash() - added:
method Document.key?(_) - added:
method Document.to_h() - added:
method Field.to_args() - added:
method GeoShapeField.to_args() - added:
method HybridCursorQuery.build_args() - added:
method HybridPostProcessingConfig.apply(**) - added:
method HybridPostProcessingConfig.build_args() - added:
method HybridPostProcessingConfig.filter(_) - added:
method HybridPostProcessingConfig.group_by(_, *) - added:
method HybridPostProcessingConfig.limit(_, _) - added:
method HybridPostProcessingConfig.load(*) - added:
method HybridPostProcessingConfig.sort_by(*) - added:
method HybridQuery.args() - added:
method HybridResult.[](_) - added:
method HybridResult.cursor?() - added:
method HybridResult.each() - added:
method HybridResult.empty?() - added:
method HybridResult.length() - added:
method HybridResult.size() - added:
method HybridSearchQuery.args() - added:
method HybridSearchQuery.scorer(_) - added:
method HybridSearchQuery.yield_score_as(_) - added:
method HybridVsimQuery.args() - added:
method HybridVsimQuery.filter(_) - added:
method HybridVsimQuery.vsim_method_params(_, **) - added:
method HybridVsimQuery.yield_score_as(_) - added:
method Index.add(_, **) - added:
method Index.aggregate(_, *) - added:
method Index.alter(_) - added:
method Index.drop(delete_documents: …) - added:
method Index.explain(_) - added:
method Index.hybrid_search(query:, combine_method: …, post_processing: …, params_substitution: …, timeout: …, cursor: …) - added:
method Index.info() - added:
method Index.profile(*) - added:
method Index.search(_ = …, query_params: …, params: …, dialect: …, nocontent: …, verbatim: …, no_stopwords: …, with_scores: …, with_payloads: …, slop: …, in_order: …, language: …, return_fields: …, summarize: …, highlight: …, sort_by: …, asc: …, scorer: …, explain_score: …) - added:
method Index.spellcheck(_, distance: …, include: …, exclude: …) - added:
method Index.syndump() - added:
method Index.synupdate(_, *, skip_initial_scan: …) - added:
method Index.tagvals(_) - added:
method NumericField.between(_, _) - added:
method NumericField.gt(_) - added:
method NumericField.lt(_) - added:
method Predicate.to_s() - added:
method PredicateCollection.add(_) - added:
method PredicateCollection.to_s() - added:
method Query.add_predicate(_) - added:
method Query.and_() - added:
method Query.dialect(_) - added:
method Query.evaluate() - added:
method Query.expander(_) - added:
method Query.expander_value() - added:
method Query.explain_score() - added:
method Query.filter(_, _, _ = …) - added:
method Query.geo_filter(_, _, _, _, _ = …) - added:
method Query.highlight(fields: …, tags: …) - added:
method Query.in_order() - added:
method Query.in_order_value() - added:
method Query.language(_) - added:
method Query.language_value() - added:
method Query.limit_fields(*) - added:
method Query.limit_fields_value() - added:
method Query.limit_ids(*) - added:
method Query.limit_ids_value() - added:
method Query.new_collection(_) - added:
method Query.no_content() - added:
method Query.no_content_value() - added:
method Query.no_stopwords() - added:
method Query.no_stopwords_value() - added:
method Query.numeric(_) - added:
method Query.or_() - added:
method Query.paging(_, _) - added:
method Query.return(*) - added:
method Query.return_field(_, as_field: …, decode_field: …) - added:
method Query.scorer(_) - added:
method Query.slop(_) - added:
method Query.slop_value() - added:
method Query.sort_by(_, _ = …, asc: …) - added:
method Query.summarize(fields: …, separator: …, len: …, frags: …) - added:
method Query.tag(_) - added:
method Query.text(_) - added:
method Query.timeout(_) - added:
method Query.timeout_value() - added:
method Query.to_redis_args() - added:
method Query.verbatim() - added:
method Query.verbatim_value() - added:
method Query.with_payloads() - added:
method Query.with_payloads_value() - added:
method Query.with_scores() - added:
method RangePredicate.to_s() - added:
method Reducers.as(_) - added:
method Schema.each() - added:
method Schema.field(_) - added:
method Schema.to_args() - added:
method SchemaDefinition.geo_field(_, **) - added:
method SchemaDefinition.geoshape_field(_, _ = …, **) - added:
method SchemaDefinition.numeric_field(_, **) - added:
method SchemaDefinition.tag_field(_, **) - added:
method SchemaDefinition.text_field(_, **) - added:
method SchemaDefinition.vector_field(_, _, **) - added:
method SearchResult.[](_) - added:
method SearchResult.each() - added:
method SearchResult.empty?() - added:
method SearchResult.length() - added:
method SearchResult.size() - added:
method TagEqualityPredicate.to_s() - added:
method TagField.eq(_) - added:
method TextField.match(_, raw: …) - added:
method TextField.to_args() - added:
method TextMatchPredicate.to_s() - added:
method VectorField.add_attribute(_, _) - added:
method VectorField.args() - added:
method VectorField.to_args() - added:
method VectorFieldDefinition.dim(_) - added:
method VectorFieldDefinition.distance_metric(_) - added:
method VectorFieldDefinition.type(_) - added:
module CombinationMethods - added:
module IndexType - added:
module ResultParser - added:
module VectorSearchMethods - added:
property AggregateResult.cursor: reader - added:
property AggregateResult.rows: reader - added:
property Asc.name: reader - added:
property Asc.order: reader - added:
property Cursor.cid: accessor - added:
property Cursor.count: accessor - added:
property Desc.name: reader - added:
property Desc.order: reader - added:
property Document.attributes: reader - added:
property Document.id: reader - added:
property Document.payload: reader - added:
property Document.score: reader - added:
property Field.alias_name: reader - added:
property Field.name: reader - added:
property Field.options: reader - added:
property Field.query: accessor - added:
property Field.type: reader - added:
property HybridFilter.args: reader - added:
property HybridResult.execution_time: reader - added:
property HybridResult.rows: reader - added:
property HybridResult.search_cursor: reader - added:
property HybridResult.total: reader - added:
property HybridResult.vsim_cursor: reader - added:
property HybridResult.warnings: reader - added:
property HybridSearchQuery.query_string: reader - added:
property HybridVsimQuery.vector_data: reader - added:
property HybridVsimQuery.vector_field: reader - added:
property Index.name: reader - added:
property Index.prefix: reader - added:
property IndexDefinition.args: reader - added:
property IndexDefinition.index_type: reader - added:
property IndexDefinition.prefixes: reader - added:
property Predicate.field: reader - added:
property PredicateCollection.predicates: reader - added:
property PredicateCollection.type: reader - added:
property Query.filters: reader - added:
property Query.geo_filters: reader - added:
property Query.highlight_options: accessor - added:
property Query.options: reader - added:
property Query.return_fields: accessor - added:
property Query.return_fields_decode: reader - added:
property Query.summarize_options: accessor - added:
property Reducers.alias_name: reader - added:
property Reducers.args: reader - added:
property Reducers.name: reader - added:
property Schema.fields: reader - added:
property SchemaDefinition.fields: reader - added:
property SearchResult.documents: reader - added:
property SearchResult.total: reader - added:
property SearchResult.warnings: reader - added:
property SortbyField.args: reader - added:
property VectorField.algorithm: reader - added:
property VectorField.attributes: reader - added:
static method CombineResultsMethod.linear(alpha: …, beta: …) - added:
static method CombineResultsMethod.rrf(window: …, constant: …) - added:
static method Index.create(_, _, _, _, prefix: …, stopwords: …, skip_initial_scan: …, **) - added:
static method Index.key_prefix(_, _) - added:
static method Index.resolve_storage_type(_, _) - added:
static method Query.build() - added:
static method Reducers.avg(_, alias_name: …) - added:
static method Reducers.collect(fields:, distinct: …, sort_by: …, limit: …, alias_name: …) - added:
static method Reducers.count(alias_name: …) - added:
static method Reducers.count_distinct(_, alias_name: …) - added:
static method Reducers.count_distinctish(_, alias_name: …) - added:
static method Reducers.first_value(_, alias_name: …, sort_by: …, sort_order: …) - added:
static method Reducers.max(_, alias_name: …) - added:
static method Reducers.min(_, alias_name: …) - added:
static method Reducers.quantile(_, _, alias_name: …) - added:
static method Reducers.random_sample(_, _, alias_name: …) - added:
static method Reducers.stddev(_, alias_name: …) - added:
static method Reducers.sum(_, alias_name: …) - added:
static method Reducers.tolist(_, alias_name: …) - added:
static method ResultParser.aggregate(_) - added:
static method ResultParser.config_get(_) - added:
static method ResultParser.decode_value(_) - added:
static method ResultParser.hashify_fields(_, _) - added:
static method ResultParser.hashify_info(_) - added:
static method ResultParser.hybrid(_) - added:
static method ResultParser.normalize_aggregate_row(_) - added:
static method ResultParser.normalize_score(_) - added:
static method ResultParser.search(_, with_scores: …, with_payloads: …, no_content: …, decode_fields: …) - added:
static method ResultParser.search_resp2(_, _, _, _, _) - added:
static method ResultParser.search_resp3(_, _) - added:
static method ResultParser.spellcheck(_) - added:
static method ResultParser.syndump(_) - added:
static method Schema.build()