Skip to content

Commit

Permalink
Filesystem-based committers now have their upserts and deletes
Browse files Browse the repository at this point in the history
synchronized.
  • Loading branch information
essiembre committed Feb 18, 2021
1 parent c076f91 commit 5402b52
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
* @author Pascal Essiembre
* @since 3.0.0
*/
@SuppressWarnings("javadoc")
public abstract class AbstractFSCommitter<T> extends AbstractCommitter
implements IXMLConfigurable {

Expand Down Expand Up @@ -151,9 +150,6 @@ public void setFileNameSuffix(String fileNameSuffix) {
protected void doInit() throws CommitterException {
if (directory == null) {
this.directory = getCommitterContext().getWorkDir();
// .resolveSibling(
// getCommitterContext().getWorkDir().getFileName()
// + "-" + getFileExtension());
}

try {
Expand All @@ -175,7 +171,7 @@ protected void doInit() throws CommitterException {
}
}
@Override
protected void doUpsert(UpsertRequest upsertRequest)
protected synchronized void doUpsert(UpsertRequest upsertRequest)
throws CommitterException {
try {
writeUpsert(upsertHandler.getDocWriter(), upsertRequest);
Expand All @@ -185,7 +181,7 @@ protected void doUpsert(UpsertRequest upsertRequest)
}
}
@Override
protected void doDelete(DeleteRequest deleteRequest)
protected synchronized void doDelete(DeleteRequest deleteRequest)
throws CommitterException {
try {
writeDelete(deleteHandler.getDocWriter(), deleteRequest);
Expand Down

0 comments on commit 5402b52

Please sign in to comment.