Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#14703 closed (duplicate)

memcached.set_many() should not special case unicode data

Reported by: gsakkis Owned by: nobody
Component: Core (Cache system) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

memcached.set_many() tries to be "smart" by explicitly checking for unicode values and encoding them as utf-8; that's not even a default value, it is actually hardcoded. The memcached.set() on the other hand just passes the value to the underlying memcached client. The bottom line is that the basic assumption that cache.set_many() is equivalent to calling cache.set() multiple times (but usually faster) is broken.

FWIW I was bitten by this in real-world code, it's not a theoretical problem without actual use cases.

Attachments (1)

13686_14703_unicode_in_memcached_backend_r14757.diff (2.0 KB) - added by accuser 5 years ago.
Extended patch(by jbalogh) from similar above-mentioned ticket

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

This is much like #13686. All get/set-type functions should be consistent here.

Changed 5 years ago by accuser

Extended patch(by jbalogh) from similar above-mentioned ticket

comment:2 Changed 5 years ago by accuser

  • Has patch set

comment:3 Changed 4 years ago by anonymous

  • Resolution set to duplicate
  • Status changed from new to closed

Closing this due to essentially duplication to #13686

A pull request has been sent for this to be included in 1.3. I'll close that one when it's in.

comment:4 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top