-
Notifications
You must be signed in to change notification settings - Fork 331
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
chore(rethinkdb): phase 4 of RetroReflection, RetroReflectionGroup and TimelineEvent #9943
Conversation
WalkthroughThe recent changes entail adding new migration scripts that are designed to remove specific tables from a RethinkDB database. Each script has an Changes
Sequence Diagram(s)This section is omitted because the changes are too straightforward to warrant a sequence diagram. Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Additional comments not posted (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
export async function up() { | ||
await connectRethinkDB() | ||
try { | ||
await r.tableDrop('TimelineEvent').run() | ||
} catch (error) { | ||
// table already dropped | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve error handling by logging the error.
While catching errors is good practice, logging the error can provide more context if something goes wrong.
try {
await r.tableDrop('TimelineEvent').run()
} catch (error) {
console.error('Error dropping TimelineEvent table:', error)
// table already dropped
}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export async function up() { | |
await connectRethinkDB() | |
try { | |
await r.tableDrop('TimelineEvent').run() | |
} catch (error) { | |
// table already dropped | |
} | |
} | |
export async function up() { | |
await connectRethinkDB() | |
try { | |
await r.tableDrop('TimelineEvent').run() | |
} catch (error) { | |
console.error('Error dropping TimelineEvent table:', error) | |
// table already dropped | |
} | |
} |
export async function up() { | ||
await connectRethinkDB() | ||
try { | ||
await r.tableDrop('RetroReflection').run() | ||
} catch (error) { | ||
// table already dropped | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve error handling by logging the error.
While catching errors is good practice, logging the error can provide more context if something goes wrong.
try {
await r.tableDrop('RetroReflection').run()
} catch (error) {
console.error('Error dropping RetroReflection table:', error)
// table already dropped
}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export async function up() { | |
await connectRethinkDB() | |
try { | |
await r.tableDrop('RetroReflection').run() | |
} catch (error) { | |
// table already dropped | |
} | |
} | |
export async function up() { | |
await connectRethinkDB() | |
try { | |
await r.tableDrop('RetroReflection').run() | |
} catch (error) { | |
console.error('Error dropping RetroReflection table:', error) | |
// table already dropped | |
} | |
} |
export async function up() { | ||
await connectRethinkDB() | ||
try { | ||
await r.tableDrop('RetroReflectionGroup').run() | ||
} catch (error) { | ||
// table already dropped | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve error handling by logging the error.
While catching errors is good practice, logging the error can provide more context if something goes wrong.
try {
await r.tableDrop('RetroReflectionGroup').run()
} catch (error) {
console.error('Error dropping RetroReflectionGroup table:', error)
// table already dropped
}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export async function up() { | |
await connectRethinkDB() | |
try { | |
await r.tableDrop('RetroReflectionGroup').run() | |
} catch (error) { | |
// table already dropped | |
} | |
} | |
export async function up() { | |
await connectRethinkDB() | |
try { | |
await r.tableDrop('RetroReflectionGroup').run() | |
} catch (error) { | |
console.error('Error dropping RetroReflectionGroup table:', error) | |
// table already dropped | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no issues merging it, but we should wait for @mattkrick to approve it.
Description
These three tables represent almost 50% of the storage and almost 55% of the documents for RethinkDB. They are not used anymore since almost two weeks for TimelineEvent and RetroReflection, and a month for RetroReflectionGroup. We are not writing new data to them and if we find any problem we should fix it in PostgreSQL.
This PR allows us to reduce backup and restoration time. We shouldn't need to delete any more tables until we are done with the migration, but these three are good candidates.
Summary by CodeRabbit
TimelineEvent
,RetroReflectionGroup
, andRetroReflection
tables using RethinkDB.