Skip to content

Releases: zendesk/active_record_shards

v5.3.2

06 Apr 05:48
9bf0e1f
Compare
Choose a tag to compare
Merge pull request #314 from zendesk/ktsanaktsidis/release_5_3_2

Release v5.3.2

ActiveRecord Shards v5.2.0

11 Oct 14:22
8b05e98
Compare
Choose a tag to compare

Added

Support for Rails 7.0 when legacy_connection_handling is set to true. This is required to opt-out of the native Rails 6.1+ sharding support.

Fixed

Rails 6.1 deprecation warnings.

Changed

Started testing with Ruby 3.1

Full diff: v5.1.0...v5.2.0

ActiveRecord Shards v5.1.0

23 Aug 10:47
e96ebbd
Compare
Choose a tag to compare

Added

Support for Rails 6.1 when legacy_connection_handling is set to true. This is required to opt-out of the native Rails 6.1 sharding support.

Full Changelog: v5.0.0...v5.1.0

ActiveRecord Shards v5.0.0

06 Jul 10:20
693c4ea
Compare
Choose a tag to compare

Changed

  • Rename ActiveRecordShards.rails_env to ActiveRecordShards.app_env, and include APP_ENV and ENV['APP_ENV'] in the list of places it looks for environment information.
  • Removed support for Ruby 2.3, 2.4, and 2.5.
  • Removed support for Rails 4.2 and 5.0.

[Deprecation] Removes all deprecated methods containing master/slave. Use the updated primary/replica methods instead. The main public methods changed:

  1. on_slave => on_replica
  2. on_master => on_primary

other methods changed:

  1. on_master_if => on_primary_if
  2. on_slave_if => on_replica_if
  3. on_master_unless => on_primary_unless
  4. on_slave_unless => on_replica_unless
  5. on_master_or_slave => on_primary_or_replica
  6. exists_with_default_slave => exists_with_default_replica
  7. from_slave => from_replica
  8. initialize_shard_and_slave => initialize_shard_and_replica
  9. ShardSelection#options no longer uses :slave, if this method was overridden ensure it returns :replica instead of :slave: { shard: .., replica: ... }

Also removes the class ActiveRecordShards::Deprecation.

Added

Add a global setting to disable marking instances from replicas as read-only. To enable:

ActiveRecordShards.disable_replica_readonly_records = true

ActiveRecord Shards v3.21.0

06 Jul 10:01
d5537a2
Compare
Choose a tag to compare

Added

Add a global setting to disable marking instances from replicas as read-only. To enable:

ActiveRecordShards.disable_replica_readonly_records = true

ActiveRecord Shards v3.20.0

06 Jul 10:01
dac9086
Compare
Choose a tag to compare

Changed

Rename ActiveRecordShards.rails_env to ActiveRecordShards.app_env, and include APP_ENV and ENV['APP_ENV'] in the list of places it looks for environment information.

ActiveRecord Shards v3.19.3

06 Jul 10:01
b94e916
Compare
Choose a tag to compare

Fixed

Fixed terrible performance when used with Rails 6.0 and having many shards defined in the database configuration.

ActiveRecord Shards v3.19.2

06 Jul 10:01
f2cee8f
Compare
Choose a tag to compare

Fixed

Fix a bug when the given database configuration was already "exploded" with deprecated keys, e.g. test_slave or others ending with _slave.

ActiveRecord Shards v3.19.1

20 Dec 10:59
aa5ec1d
Compare
Choose a tag to compare

Fixed

Converts the ActiveRecord::Base.configurations object introduced in Rails 6 into a hash as expected.

ActiveRecord Shards v3.19.0

20 Dec 10:59
827eb69
Compare
Choose a tag to compare

Changed / Fixed

Lots of improvements to the on_replica_by_default logic, now covered by an improved test suite. Schema loading should now always happen on the replica databases, and non-mutating queries will should now happen on the replica except when on_replica_by_default is not configured.