[hibernate-commits] [hibernate/hibernate-search] f4bba5: HSEARCH-2886 Fix a test that didn't properly close...

GitHub noreply at github.com
Fri Sep 22 17:23:30 EDT 2017


  Branch: refs/heads/5.8
  Home:   https://github.com/hibernate/hibernate-search
  Commit: f4bba56757f982466e51f308d3018e9607bb9ccb
      https://github.com/hibernate/hibernate-search/commit/f4bba56757f982466e51f308d3018e9607bb9ccb
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M elasticsearch/src/test/java/org/hibernate/search/elasticsearch/test/GsonStreamedEncodingTest.java

  Log Message:
  -----------
  HSEARCH-2886 Fix a test that didn't properly close an HttpEntity


  Commit: 60fdb368b1990a8a4a7712ae2caf8219b332213c
      https://github.com/hibernate/hibernate-search/commit/60fdb368b1990a8a4a7712ae2caf8219b332213c
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/util/impl/GsonHttpEntity.java

  Log Message:
  -----------
  HSEARCH-2886 Use hintContentLength() in GsonHttpEntity.attemptOnePassEncoding()

Since this method exists, let's use it consistently.


  Commit: f124f4f9f40dc89ba42177e14b22b8907b9bc93e
      https://github.com/hibernate/hibernate-search/commit/f124f4f9f40dc89ba42177e14b22b8907b9bc93e
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/util/impl/GsonHttpEntity.java

  Log Message:
  -----------
  HSEARCH-2886 Simplify GsonHttpEntity by only ever storing byte buffers

We used to have two levels of buffering, one before encoding (char
buffers) and one after encoding (byte buffers). This implied to
frequently copy char buffers, and more critically to split the char
stream arbitrarily, which resulted in encoding errors when characters
stored over multiple "char" (more than 2 bytes) were split between
two buffers.

After this commit, we encode everything on-the-fly, and store the
resulting bytes in buffers whenever flow control pushes back.


  Commit: da18e382fcf16ac6b277ba28b131d630fc21a2dd
      https://github.com/hibernate/hibernate-search/commit/da18e382fcf16ac6b277ba28b131d630fc21a2dd
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/util/impl/GsonHttpEntity.java
    M integrationtest/elasticsearch/src/test/java/org/hibernate/search/elasticsearch/test/client/ElasticsearchContentLengthIT.java

  Log Message:
  -----------
  HSEARCH-2886 Elasticsearch: do not switch to chunked encoding when the very last body part overflows to a second buffer page

We used to switch to chunked encoding when the very last body part
forced us to use a second buffer, but this is no longer necessary,
since we now know the content-size in that specific case (because we
encode input immediately).


  Commit: a029aa98e3a9c390ffcb712ce8ff13d9765d63c2
      https://github.com/hibernate/hibernate-search/commit/a029aa98e3a9c390ffcb712ce8ff13d9765d63c2
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/util/impl/GsonHttpEntity.java
    A elasticsearch/src/main/java/org/hibernate/search/elasticsearch/util/impl/ProgressiveCharBufferWriter.java

  Log Message:
  -----------
  HSEARCH-2886 Move ProgressiveCharBufferWriter to its own file


  Commit: 27950c08fd32fd5a9d9ad9752db110d2a7229491
      https://github.com/hibernate/hibernate-search/commit/27950c08fd32fd5a9d9ad9752db110d2a7229491
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2017-09-22 (Fri, 22 Sep 2017)

  Changed paths:
    M elasticsearch/src/test/java/org/hibernate/search/elasticsearch/test/GsonStreamedEncodingTest.java

  Log Message:
  -----------
  HSEARCH-2886 Test for Elasticsearch char buffers splitting a unicode surrogate pair


Compare: https://github.com/hibernate/hibernate-search/compare/90fb4cb6b0b7...27950c08fd32


More information about the hibernate-commits mailing list