Opened 12 years ago

Closed 12 years ago

Last modified 7 years ago

#5291 closed defect (fixed)

[with patch, positive review] notebook - Do not save snapshots if nothing has changed

Reported by: mabshoff Owned by: boothby
Priority: critical Milestone: sage-3.3
Component: notebook Keywords:
Cc: timothy.clemans@…, jason-sage@… Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

This problem has come up over and over again. Per default Sage saves a snapshot every 3 minutes regardless if anything has changed or not. This can add up to a *lot* of identical snapshots if a computation is left running a long time. And that in turn causes people with quotas to run out of space as reported in

http://groups.google.com/group/sage-devel/browse_thread/thread/8544666b8b18660c#

I am making this a critical issue against 3.3.

Cheers,

Michael

Attachments (1)

trac-5291.2.patch (934 bytes) - added by TimothyClemans 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by TimothyClemans

  • Cc timothy.clemans@… added

Changed 12 years ago by TimothyClemans

comment:2 Changed 12 years ago by TimothyClemans

  • Summary changed from notebook - Do not save snapshots if nothing has changed to [with patch, needs review] notebook - Do not save snapshots if nothing has changed

I tested it by setting the auto save interval to 10 seconds and clicking undo to see the revisions. Each revision was different.

comment:3 Changed 12 years ago by jason

I'm not sure that this fixes the problem. Isn't saving to worksheet.txt and saving a snapshot two different things? If so, then I imagine there will be a time when things are saved to worksheet.txt, and then a snapshot should happen, but wouldn't under this code.

comment:4 Changed 12 years ago by jason

  • Cc jason-sage@… added

comment:5 Changed 12 years ago by TimothyClemans

save calls save_snapshot which updates worksheet.txt

comment:6 Changed 12 years ago by was

  • Summary changed from [with patch, needs review] notebook - Do not save snapshots if nothing has changed to [with patch, positive review] notebook - Do not save snapshots if nothing has changed

save calls save_snapshot which updates worksheet.txt

yep. Snapshotting *only* ever writes a copy of worksheet.txt.

REVIEW:

  • positive review -- but it is not an efficient approach.

See Trac #5300 which will be about doing the same thing more efficiently.

comment:7 follow-up: Changed 12 years ago by mabshoff

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

Merged in Sage 3.3.rc2.

Cheers,

Michael

comment:8 in reply to: ↑ 7 Changed 12 years ago by rbeezer

Replying to mabshoff:

It appears to me that this code only gets called if (1) there is a worksheet edit, and (2) the time since the last save exceeds the per-user autosave_interval. If so, checking for a change is always true. See #5459 for more.

comment:9 Changed 7 years ago by kcrisman

  • Report Upstream set to N/A

Was this even ever merged? https://github.com/sagemath/sagenb/blob/master/sagenb/notebook/worksheet.py does not have this diff, and I have a version of Sage from 2010 hanging around that does not have it either. Maybe it was unmerged at some unspecified point...

(Also note that the function in question also has return as its first line.)

Note: See TracTickets for help on using tickets.