Code

Opened 4 years ago

Closed 4 years ago

#13817 closed (wontfix)

Error message when cache.set has trouble.

Reported by: ezimir Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I am using low-level cache in my app, there were some cases when the cache.set method reported the TransactionManagementError: This code isn't under transaction management error, because (I guessed) that there is some underlying DB execution error.

I managed to find out what that original error was (with PDB) (and solve the problem):
OperationalError: (1153, "Got a packet bigger than 'max_allowed_packet' bytes")

Now, is there a way to retrieve the original error from code? Is there a way to tell Django not to try to rollback that unsuccessful query? Is it a bug (i.e. Django shouldn't try to rollback code that is not under transaction management)? Is it a version specific problem?

django.VERSION is:
(1, 1, 1, 'final', 0)
django.get_version() says:
1.1.1 SVN-865

Thank you for your time.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

As of Django 1.3, key length is validated before use, so this error shouldn't occur any more.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.