MM-31612 Optimize bulk import process by avoiding writing zip to disk (#17659)

Этот коммит содержится в:
Ian Whitlock
2021-06-09 11:11:46 -05:00
коммит произвёл GitHub
родитель 72c86448b9
Коммит fe94a20ce7
12 изменённых файлов: 281 добавлений и 90 удалений

Просмотреть файл

@@ -150,7 +150,7 @@ func bulkImportCmdF(command *cobra.Command, args []string) error {
CommandPrettyPrintln("")
if err, lineNumber := a.BulkImportWithPath(&request.Context{}, fileReader, !apply, workers, importPath); err != nil {
if err, lineNumber := a.BulkImportWithPath(&request.Context{}, fileReader, nil, !apply, workers, importPath); err != nil {
CommandPrintErrorln(err.Error())
if lineNumber != 0 {
CommandPrintErrorln(fmt.Sprintf("Error occurred on data file line %v", lineNumber))

Просмотреть файл

@@ -374,7 +374,8 @@ func sampleDataCmdF(command *cobra.Command, args []string) error {
}
var importErr *model.AppError
importErr, lineNumber := a.BulkImport(&request.Context{}, bulkFile, false, workers)
importErr, lineNumber := a.BulkImport(&request.Context{}, bulkFile, nil, false, workers)
if importErr != nil {
return fmt.Errorf("%s: %s, %s (line: %d)", importErr.Where, importErr.Message, importErr.DetailedError, lineNumber)
}