Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit fixes the reschedule async fsync test in index service tests. This test was passing for the wrong reason. Namely, the test was trying to set translog durability to async, fire off an indexing request, and then assert that the translog eventually got fsynced. The problem here is that in the course of issuing the indexing request, a mapping update is trigger. The mapping update triggers the index settings to be refreshed. Since the test did not issue a cluster state update to change the durability from request to async but instead did this directly through index service, the mapping update flops the durability back to async. This means that when the indexing request executes, an fsync is performed after the request and the assertoin that an fsync is not needed passes but for the wrong reason (in short: the test wanted it to pass because an async fsync fired, but instead it passed because a request async fired). This commit fixes this by going through the index settings API so that a proper cluster state update is triggered and so the mapping update does not flop the durability back to request.
- Loading branch information