Skip to content
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 Request/Idea: API / dashboard page to export and/or truncate actionlogrecord table #9357

Open
donsizemore opened this issue Feb 2, 2023 · 2 comments

Comments

@donsizemore
Copy link
Contributor

Overview of the Feature Request

Currently, the Admin Guide recommends that the actionlogrecord be regularly purged: https://guides.dataverse.org/en/latest/admin/troubleshooting.html#what-s-with-this-table-actionlogrecord-in-our-database-it-seems-to-be-growing-uncontrollably

It would be great to allow superusers to view the table and optimally to truncate it by date via the admin dashboard, or helpful to allow a superuser to export the table and truncate it via API.

What kind of user is the feature intended for?

API user, Archivist, Admin

What inspired the request?

https://guides.dataverse.org/en/latest/admin/troubleshooting.html#what-s-with-this-table-actionlogrecord-in-our-database-it-seems-to-be-growing-uncontrollably

What existing behavior do you want changed?

https://guides.dataverse.org/en/latest/admin/troubleshooting.html#what-s-with-this-table-actionlogrecord-in-our-database-it-seems-to-be-growing-uncontrollably

Any brand new behavior do you want to add to Dataverse?

These two(?) API endpoints and potentially a page in the admin dashboard.

Any related open or closed issues to this feature request?

#9356 mentioned the condition, and prompted this issue.

@donsizemore
Copy link
Contributor Author

donsizemore commented Mar 27, 2023

As of this morning, our DB's actionlogrecord table holds 7,821,589 entries. Of those, 7,512,823 contain useridentifier :guest.

Some of these are successes (like CreateGuestbookResponseCommand, the results of which in theory appear in guestbookresponse) but others (3,545,322) are PermissionError from bots denied their naughty endeavors.

If, and this is a big if, the actionlogrecord table's :guest entries aren't entirely useful on their own merit, this feature request might be simplified by the addition of a :DontLogGuestActions or some such DB setting.

@donsizemore
Copy link
Contributor Author

This morning a community installation, unable to perform any actions (like creating a collection), found the following error:

pg_dump: error: Dumping the contents of table "actionlogrecord" failed: PQgetResult() failed.
pg_dump: error: Error message from server: ERROR:  invalid memory alloc request size 18446744073709551613
pg_dump: error: The command was: COPY public.actionlogrecord (id, actionresult, actionsubtype, actiontype, endtime, info, starttime, useridentifier) TO stdout;

Trimming the actionlogrecord table resolved this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant