Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-12755 SoftIndexFileStore New SPI #9081

Merged

Conversation

wburns
Copy link
Member

@wburns wburns commented Feb 22, 2021

https://issues.redhat.com/browse/ISPN-12755

This PR breaks segmented store configuration for soft index file store. The subsequent PR will add this support back in and segmented will be the only running operation as there is no need to not have segmented with the new algorithm.

@wburns wburns added the Preview label Feb 22, 2021
@wburns
Copy link
Member Author

wburns commented Feb 23, 2021

Looks like my changes broke the migrator. Probably because it no longer supports segmentation. I need to see if I can fix this still and what to do.

@wburns wburns force-pushed the ISPN-12755_softindex_new_spi branch 7 times, most recently from 3a4dfc4 to f3d4cc5 Compare March 5, 2021 16:17
* Returns an executor that will run the given tasks on a blocking thread as required.
* <p>
* Note that if the current thread is blocking, the task is invoked in the current thread, meaning the stage is
* always completed when returned, so any chained stage is also invoked on the current thread.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might have been copy and pasted in error. A Executor only allows Runnable so no stages or chained stages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can clean this up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I forgot I changed this in my most recent work. I will update it to be the same.

@@ -131,6 +132,7 @@ public void run() {
try {
scheduledFile = scheduledCompaction.poll(1, TimeUnit.MINUTES);
} catch (InterruptedException e) {
throw new CacheException(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thread.currentThread().interrupt(); first?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it. Just an FYI though this code is completely removed in the next PR :)

delay = AsyncProcessor.create();
completeRequest(request);
return;
} else if (request.isResume()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick. No need for else if with return.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still required. The task is a write based operation otherwise.

currentOffset = 0;
logFile = null;
// TODO: Technically other writes won't be notified if sync write is enabled until
// the timeout above
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything we can do this? Or do we need to remove the TODO and just comment the behaviour?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a better way to fix it. I can just comment that is the behavior. It is very similar to the behavior before.

} catch (Exception e) {
queue.notifyError();
throw new RuntimeException(e);
request.completeExceptionally(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth adding a debug log here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, it shouldn't really ever happen. I can add it.

}

@Override
// TODO: this is probably broken, look into
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The destroy method is never even invoked, even before my changes. I think i will just remove the method.

public static LogRequest stopRequest() {
return new LogRequest(Type.STOP);
}

public static LogRequest pauseRequest() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually looking closer, we do need the pause method for size. I will add this back in.

@ryanemerson
Copy link
Contributor

@wburns Now that I have got my head around the LogAppender changes LGTM, just a few minor things. As well as my comments there are a few more TODO statements that need addressing/removing.

@wburns wburns removed the Preview label Mar 9, 2021
@wburns
Copy link
Member Author

wburns commented Mar 9, 2021

@tristantarrant given the fact that segmentation configuration parameters will be changed in this PR and the subsequent can you make a judgement if this requires waiting for a branch to be integrated into 13.0 only or if 12.1 is okay as well?

@wburns
Copy link
Member Author

wburns commented Mar 9, 2021

Talking with Tristan he gave the green like for the changes into 12.1. However, we really need this PR and #9114 both integrated (granted the other relies upon this one).

@wburns wburns force-pushed the ISPN-12755_softindex_new_spi branch from dd39d5b to 83d4ae2 Compare March 10, 2021 21:21
@wburns wburns changed the title [PREVIEW] ISPN-12755 SoftIndexFileStore New SPI ISPN-12755 SoftIndexFileStore New SPI Mar 10, 2021
@wburns wburns force-pushed the ISPN-12755_softindex_new_spi branch from 83d4ae2 to 767e444 Compare March 10, 2021 22:03
@tristantarrant tristantarrant merged commit db80ccb into infinispan:master Mar 12, 2021
@tristantarrant
Copy link
Member

Great work @wburns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants