-
Notifications
You must be signed in to change notification settings - Fork 23
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
🍄 Separate trash for the personal and shared drive #189
🍄 Separate trash for the personal and shared drive #189
Conversation
@@ -77,7 +77,7 @@ export function buildSelectQuery<Entity>( | |||
whereClause.trim().length ? "WHERE " + whereClause : "" | |||
} ${orderByClause.trim().length ? "ORDER BY " + orderByClause : ""}` | |||
.trimEnd() | |||
.concat(";"); | |||
.concat(" ALLOW FILTERING;"); |
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.
What is the actual query being executed?
Beware of ALLOW FILTERING
on Cassandra, this is a performance killer, and a sign that the underlying data model needs to be re-thought.
I stay available might you need a Cassandra data model workshop.
@@ -17,7 +17,7 @@ describe("The QueryBuilder module", () => { | |||
const result = buildSelectQuery<DriveFile>(DriveFile, filters, {}, { keyspace: "tdrive" }); | |||
|
|||
expect(result).toEqual( | |||
"SELECT * FROM tdrive.drive_files WHERE company_id = comp1 AND parent_id = 'parent1';", | |||
"SELECT * FROM tdrive.drive_files WHERE company_id = comp1 AND parent_id = 'parent1' ALLOW FILTERING;", |
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.
Sorry but this looks BAD to me.
Can you disclose the table structure? The requests you are performing on this table?
Coverage Report
Click to view remaining coverage report
|
@@ -28,6 +29,7 @@ export function buildSelectQuery<Entity>( | |||
return; | |||
} | |||
if (isObject(filter) && JSON.stringify(filter).includes("ne")) { | |||
allowFiltering = true; |
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.
Again have you been conducting serious performance benchmarks before conducting this change?
Due to the "log structured merge tree" architecture of the Cassandra storage, allow filtering can cause each request to scan through potentially terabytes of data.
As explained yesterday, I have big doubts that this change is compatible with anything looking to a serious production set up and would advise the team to look for a longer term solution.
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.
Generally yes, but in our case we're restricting the partition and using indexes to query the data. We're also restricting the use of Allow filtering to a very specific scenario. We won't end up scanning through terabytes of data.
@MontaGhanmy take a look please When you click in the "Trash", the menu item is not highlighted |
There is no way to restore items from trash. |
No description provided.