iis icon indicating copy to clipboard operation
iis copied to clipboard

Refactor AbstractDBBuilder hierarchy and check if targetDbFile needs to be explicitly set as writable

Open marekhorst opened this issue 2 years ago • 0 comments

It looks like all implementations of AbstractDBBuilder#initializeProcess() in the following subclasses:

  • CommunityDBBuilder
  • DatasetDBBuilder
  • ServiceDBBuilder
  • PatentDBBuilder
  • ProjectDBBuilder
  • ResearchInitiativeDBBuilder
  • SoftwareHeritageOriginDBBuilder

are quite similar and it should be possible to refactor it and put most of the code in a shared method.

We should also check if targetDbFile.setWritable(true); is really needed and justified since it doesn't work for non-existing files. We should check if it is possible this file could be already created e.g. by previous execution of this process on the same datanode. This was referenced in https://github.com/openaire/iis/pull/1398#discussion_r1191070605 as a part of CR process.

marekhorst avatar May 12 '23 20:05 marekhorst