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

[ticket/15699] Move files between storages when configuration is changed #5270

Merged
merged 34 commits into from
Jun 7, 2024

Conversation

rubencm
Copy link
Member

@rubencm rubencm commented Jun 25, 2018

Checklist:

  • Correct branch: master for new features; 3.2.x for fixes
  • Tests pass
  • Code follows coding guidelines: master and 3.2.x
  • Commit follows commit message format

Depends on #6533

Tracker ticket (set the ticket ID to your ticket ID):

https://tracker.phpbb.com/browse/PHPBB3-15699

  • Remove popup
  • Rewrite part of instance adapters
  • Show more information on progress, display progress bar
  • Use template macros
  • Dont allow to update storage when there is a process in progress

@Nicofuma
Copy link
Member

Looks good (i only reviewed the last commit) even if I find it a bit sad to have SQL requests like that in many different place. Maybe later we could rework that in order to centralize the SQL requests

@rubencm
Copy link
Member Author

rubencm commented Jun 30, 2018

I don't understand what you mean with having the sql query in a diferent place.
About this... it work, but my idea is to do a progress bar and refresh or something to avoid timeouts like in the installer, but don't know much how.

@Nicofuma
Copy link
Member

@CHItA @hanakin @marc1706 maybe you can help with the progress bar stuff.
By the way I think we already have something like that for the search index (but it may be a bit old and not reusable).

About the SQL queries forget it.

@rubencm rubencm force-pushed the ticket/15699 branch 2 times, most recently from 9067a83 to bcfba03 Compare July 1, 2018 20:15
$options[$definition] = $this->get_current_definition($storage_name, $definition);
}

$adapter->configure($options);
Copy link
Member Author

Choose a reason for hiding this comment

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

Probably i will need to add here in the future
$adapter->set_storage($storage_name);

@Nicofuma
Copy link
Member

Still WIP now #4933 has been merged?

@rubencm
Copy link
Member Author

rubencm commented Jul 13, 2018

Yes, i think files should be moved with ajax or something in steps, because only with a few files will be timeout

@gooof
Copy link

gooof commented Jul 18, 2018

I'am voting for the search index code. It's old and working great.
You should disable the board while moving files.
Get all files (or better all file IDs from database, or even better, from the smallest to the largest ID like the search index creation) and write it as current state to table config_text. Then move file by file and unset it from the config_text json.
https://github.com/phpbb/phpbb/blob/master/phpBB/includes/acp/acp_search.php#L365..L451

@rubencm
Copy link
Member Author

rubencm commented Jul 18, 2018

So i save a list with all files and the index as the state?

@gooof
Copy link

gooof commented Jul 18, 2018

No sorry, not a good idea. I miss that you add a own storage table. Use it from low to high like the search index creator. You should only save the current ID as state.

@rubencm rubencm force-pushed the ticket/15699 branch 6 times, most recently from 921d038 to 4b00c5c Compare July 25, 2018 10:55
@rubencm
Copy link
Member Author

rubencm commented Jul 25, 2018

This is done.
I have to check if it works with a large number of files and outside but for a few avatar in local it seems to work.

@rubencm rubencm force-pushed the ticket/15699 branch 3 times, most recently from 35f5a76 to d791406 Compare July 25, 2018 11:36
@Nicofuma
Copy link
Member

nice

rubencm and others added 27 commits June 6, 2024 23:47
PHPBB3-15699

Co-authored-by: Marc Alexander <admin@m-a-styles.de>
@marc1706 marc1706 merged commit e2ff7a7 into phpbb:master Jun 7, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants