Tracking rails/solid_cache compatibility
jonahgeorge opened this issue · 0 comments
jonahgeorge commented
With the announcement of rails/solid_cache
at RailsWorld 2023, I wanted to see if it would work with activerecord-sqlserver-adapter... a few findings:
Usage of unique index on varbinary column
ActiveRecord::StatementInvalid: TinyTds::Error: Column 'key' in table 'solid_cache_entries' is of a type that is invalid for use as a key column in an index.
/Users/jonahgeorge/src/solid_cache/test/dummy/db/schema.rb:14:in `block in <top (required)>'
/Users/jonahgeorge/src/solid_cache/test/dummy/db/schema.rb:13:in `<top (required)>'
Caused by:
TinyTds::Error: Column 'key' in table 'solid_cache_entries' is of a type that is invalid for use as a key column in an index.
/Users/jonahgeorge/src/solid_cache/test/dummy/db/schema.rb:14:in `block in <top (required)>'
/Users/jonahgeorge/src/solid_cache/test/dummy/db/schema.rb:13:in `<top (required)>'
Tasks: TOP => db:setup => app:db:setup => app:db:schema:load
This one seems fairly easy to resolve, an option in the upstream project to enable the usage of text
fields rather than binary
fields seems like something that could get accepted. AFAICT they're only using binary fields for minor performance gains.
Lack of upsert support
Error:
SolidCacheFailsafeTest#test_fetch_multi_failure_returns_fallback_results:
ArgumentError: ActiveRecord::ConnectionAdapters::SQLServerAdapter does not support upsert
Tracking Issue: #859