Skip to content

Point In Time - does not support having a body #8396

@HaggeMan

Description

@HaggeMan

Elastic.Clients.Elasticsearch version: 8.13.2

Elasticsearch version: 8.13.2

.NET runtime version: 8.15.10

Operating system version: Windows 11

Description of the problem including expected versus actual behavior:

public async Task<string> CreatePitAsync(TimeSpan keepAlive, CancellationToken ct = default)
      {
          var keepAliveString = $"{(int)keepAlive.TotalMinutes}m";

          var pitResponse = await _client.OpenPointInTimeAsync(new OpenPointInTimeRequest(_indexName)
          {
              KeepAlive = keepAliveString,
          } 
          ).ConfigureAwait(false);

          if (!pitResponse.IsValidResponse)
              throw new Exception($"Failed to create PIT: {pitResponse.DebugInformation}");

          return pitResponse.Id;
      }

Steps to reproduce:

  1. Create a client in the constructor
  2. Call the method
  3. You will get IsValidResponse = false with the DebufInformation: "does not support having a body", when analyzing the query in Fiddler it looks like {} is sent in the body but nothing should be sent.

Expected behavior
The client should not send {} in the body

Provide DebugInformation (if relevant):
This is how it looks like when sending the body like the client...
Image

When sending an empty body...
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions