[BUGFIX] Remove depricated attribute waitFlush for "commit" and "optimize"