Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete migration of FeedbackSession entities #8448

Closed
whipermr5 opened this issue Feb 14, 2018 · 4 comments
Closed

Complete migration of FeedbackSession entities #8448

whipermr5 opened this issue Feb 14, 2018 · 4 comments
Assignees
Labels
a-Storage Database schema, Datastore-related technologies/quirks

Comments

@whipermr5
Copy link
Member

whipermr5 commented Feb 14, 2018

Continuing work from #8094, #8410, #8456 and #8759, the script from #8759 can be run in the near future to migrate all FeedbackSession entities:

After running the script from #8759, these tasks remain:

  • Remove unused timeZoneDouble and wasFollowingCourseTimeZone fields (simple code deletion)
  • Remove unused @OnLoad methods (simple code deletion)
    • convertFieldsToUtcIfRequired()
    • setTimeZoneFromCourseTimeZoneIfRequired()
    • populateMissingBooleansIfRequired()
    • adjustResultsVisibleFromTimeIfRequired()
  • Change all boolean fields to primitives (FeedbackSession: use primitive type for all booleans #8451) (simple code edits)
  • Remove isTimeStoredInUtc and isFollowingCourseTimeZone flags (another script needed)
  • Simplify queries in FeedbackSessionsDb, namely getAllOpenFeedbackSessions and getFeedbackSessionEntitiesPossiblyNeeding(Open|Closed|Closing)Email
    • Investigate other queries that can be simplified (AdminSessions?)
    • This task is bigger and a new issue can be opened for it once the script is run
@whipermr5 whipermr5 added the a-Storage Database schema, Datastore-related technologies/quirks label Feb 14, 2018
@whipermr5 whipermr5 self-assigned this Feb 14, 2018
@whipermr5
Copy link
Member Author

whipermr5 commented Mar 6, 2018

This will require load()/save()-ing ALL existing FeedbackSession entities in the datastore. @damithc when was the last time a migration of this scale took place? #6001? I'm wondering whether the existing client script framework is good enough; I suspect it will suffer from timeouts. I'm considering building a heavy duty client script framework that runs on the server itself via task queues - DataMigrationServlet. This way, the conversion will happen efficiently on the server and the data doesn't have to stream through a local machine.

For future reference: https://groups.google.com/d/msg/objectify-appengine/meUDiiUmD-Q/jm15CzBxym4J

@damithc
Copy link
Contributor

damithc commented Mar 7, 2018

@damithc when was the last time a migration of this scale took place?

We have nearly 30k session objects.
Yes, we need something more sturdy. Not sure if we should go serverside though. The problem is serverside requires a deployment and admin has less control during the migration process. In all past migrations I need to tweak the script along the way to deal with various 'dirty' data items i.e., not all data objects are in the exact format we expect them to be. There can be stray nulls, and so on.
Alternatives:

  • make the script incremental e.g., run for sessions of one year at a time rather than all objects
  • make the script repeatable e.g., if it times out, I should be able to rerun the script and it should skip over the entities already migrated

@whipermr5 whipermr5 added this to To do in Migration to java.time via automation Mar 22, 2018
@whipermr5 whipermr5 moved this from To do to In progress in Migration to java.time Apr 9, 2018
@whipermr5 whipermr5 changed the title Complete migration of FeedbackSession time fields Complete migration of FeedbackSession entities Apr 10, 2018
@xpdavid
Copy link
Contributor

xpdavid commented Aug 21, 2018

Related to #9044 to develop an new migration framework.

@xpdavid
Copy link
Contributor

xpdavid commented Sep 14, 2018

Done 🎉 Related issues created in #9125

@xpdavid xpdavid closed this as completed Sep 14, 2018
Migration to java.time automation moved this from In progress to Done Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Storage Database schema, Datastore-related technologies/quirks
Projects
No open projects
Development

No branches or pull requests

3 participants