-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
FEATURE: add dimensions hash to node event model #3279
FEATURE: add dimensions hash to node event model #3279
Conversation
{ | ||
$eventLogResult = $this->connection->executeQuery('SELECT uid, dimension FROM neos_neos_eventlog_domain_model_event'); | ||
|
||
while ($eventLogInfo = $eventLogResult->fetchAssociative()) { |
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.
This might need a loooong time for larger node event tables (and they tend to get pretty large). It thought about how to delegate more of the work to the database. What about:
--pseudo code--
while $dimensionsArray = 'SELECT dimension FROM neos_neos_eventlog_domain_model_event where dimensionshash IS NULL LIMIT 1' {
$dimensionsHash = Utility::sortDimensionValueArrayAndReturnDimensionsHash($dimensionsArray);
$this->connection->executeStatement('UPDATE neos_neos_eventlog_domain_model_event SET dimensionshash = ? WHERE dimension = ?', [$dimensionsHash, $dimensionsArray);
}
Should work in O(n), with n = dimensionCombinations and should be much faster.
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.
Hi @daniellienert , I adjusted the postUp function according to your suggestion. Can you please check, whether my adjustments are ok? Thank you.
Just reopened to trigger the pipelines again :) |
Could you work on that for 8.3? |
Hi @markusguenther, yes I will take a look at it and rebase my changes onto the 8.3 code base. |
e23e191
to
de8fe60
Compare
Hi @markusguenther I rebased my changes. Because I first rebased to the 8.2 branch and then to the 8.3 branch a tranalation from 8.2 is also in my changes which is missing in 8.3 at the moment. After 8.2 is upmerged into 8.3 this change should not be listed. Please check my changes and let me know, if something needs to be adjusted. Tnak you. |
de8fe60
to
1975ee6
Compare
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.
Thanks for the contribution :)
Maybe @daniellienert can add another review.
I want to extended the history view of the package https://github.com/aertmann/history with a filter for the dimension. With this website admins get a much needed additional filter for the history view of a web site with several dimensions and dimension values. In preparation for the extensions of the https://github.com/aertmann/history package I created these changes to the node event model. Please let me know, if additional changes are needed. Thank you in advanced.