You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are facing a database size increase in our MongoDB 5 server since we've upgraded some gems including this one from our Rails 6.1 application.
Basically, when deleting a model that has a Carrierwave mounter with the :grid_fs storage engine, it destroys the GridFs::File but not the associated GridFs::Chunk.
I can't find any test from this gem checking for the cleaning of the chunks since, I guess, it's up to the mongoid-grid_fs gem to take care of it.
Have anyone experienced this issue ?
The text was updated successfully, but these errors were encountered:
Hi! To fix this issue and destroy associated chunks together with file i added monkey patch for delete method
module CarrierWave
module Storage
class GridFS
class File
def delete
grid_file.destroy if grid_file
end
end
end # GridFS
end # Storage
end # CarrierWave
We are facing a database size increase in our MongoDB 5 server since we've upgraded some gems including this one from our Rails 6.1 application.
Basically, when deleting a model that has a Carrierwave mounter with the
:grid_fs
storage engine, it destroys theGridFs::File
but not the associatedGridFs::Chunk
.I can't find any test from this gem checking for the cleaning of the chunks since, I guess, it's up to the
mongoid-grid_fs
gem to take care of it.Have anyone experienced this issue ?
The text was updated successfully, but these errors were encountered: