Skip to content

Commit

Permalink
hot fix (#13092)
Browse files Browse the repository at this point in the history
  • Loading branch information
FergusMok authored Apr 24, 2024
1 parent 2272666 commit e9df554
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private boolean isPreview() {
* Returns whether the account has been migrated.
*/
protected boolean isMigrationNeeded(teammates.storage.entity.Account entity) {
return !entity.isMigrated();
return true;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class DataMigrationForCourseEntitySql extends DatastoreClient {
AtomicLong numberOfScannedKey;
AtomicLong numberOfUpdatedEntities;

private static final int MAX_RESPONSE_COUNT = 10000;
private static final int MAX_RESPONSE_COUNT = -1;

private VerifyCourseEntityAttributes verifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class DataMigrationForCourseEntitySql50Newest extends DatastoreClient {
AtomicLong numberOfScannedKey;
AtomicLong numberOfUpdatedEntities;

private static final int MAX_RESPONSE_COUNT = 10000;
private static final int MAX_RESPONSE_COUNT = -1;

private VerifyCourseEntityAttributes verifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class DataMigrationForCourseEntitySql50Oldest extends DatastoreClient {
AtomicLong numberOfScannedKey;
AtomicLong numberOfUpdatedEntities;

private static final int MAX_RESPONSE_COUNT = 10000;
private static final int MAX_RESPONSE_COUNT = -1;

private VerifyCourseEntityAttributes verifier;

Expand Down Expand Up @@ -323,6 +323,7 @@ private void migrateFeedbackQuestion(teammates.storage.sqlentity.FeedbackSession
oldResponses = ofy().load().type(FeedbackResponse.class)
.filter("feedbackQuestionId", oldQuestion.getId()).list();
}
log(String.format("Feedback question %d has %d responses associated with it", oldQuestion.getQuestionNumber(), oldResponses.size()));
for (FeedbackResponse oldResponse : oldResponses) {
Section newGiverSection = sectionNameToSectionMap.get(oldResponse.getGiverSection());
Section newRecipientSection = sectionNameToSectionMap.get(oldResponse.getRecipientSection());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ private boolean verifyFeedbackQuestion(FeedbackQuestion oldQuestion,
.filter("feedbackQuestionId", oldQuestion.getId()).list();

if (newResponses.size() != oldResponses.size()) {
log(String.format("Mismatched response counts for question %s, session: %s, course id: %s",
log(String.format("Mismatched response counts for question. New: %d, Old: %d, %s, session: %s, course id: %s",
newResponses.size(), oldResponses.size(),
oldQuestion.getQuestionNumber(), oldQuestion.getFeedbackSessionName(), oldQuestion.getCourseId()));
return false;
}
Expand Down

0 comments on commit e9df554

Please sign in to comment.