Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,9 @@ export class DataAccessObjectRedis extends BasicDataAccessObject implements IDat
} else {
try {
const keyType = await redisClient.type(key);
if (keyType !== 'none') {
standaloneKeys.push({ key, type: keyType });
}
// if (keyType !== 'none') {
standaloneKeys.push({ key, type: keyType });
// }
Comment on lines +829 to +831
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this check will cause non-existent keys to be included in the results. In Redis, the TYPE command returns 'none' when a key doesn't exist. This can happen due to a race condition: a key could be deleted between the keys('*') call on line 818 and the type(key) call on line 828. Without this check, tables with names like [none]deleted_key would be created for keys that no longer exist, which would lead to incorrect table listings.

Suggested change
// if (keyType !== 'none') {
standaloneKeys.push({ key, type: keyType });
// }
if (keyType !== 'none') {
standaloneKeys.push({ key, type: keyType });
}

Copilot uses AI. Check for mistakes.
} catch (_error) {
continue;
}
Expand Down
Loading