Skip to content

Update dependency com.cinchapi:concourse-driver-java to v1 - #11

Open
cinchapi-agent[bot] wants to merge 1 commit into
developfrom
feature/deps-major-concourse
Open

cinchapi-agent[bot] wants to merge 1 commit into
developfrom
feature/deps-major-concourse

Conversation

@cinchapi-agent

@cinchapi-agent cinchapi-agent Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Type Update Change
com.cinchapi:concourse-driver-java dependencies major 0.10.5 → 1.1.2

Release Notes

cinchapi/concourse (com.cinchapi:concourse-driver-java)

v1.1.2

  • Fixed a bug
    (cinchapi/lib-config#8)
    that caused Concourse to shorten a configuration value that contained ! when
    it wrote the value to a YAML file. The value lost each ! and the text after
    it, up to the next space or the end of the value. For example,
    concourse config write -k init_root_password -v 'ab!cd' stored ab as the
    initial root password. The setters of ConcourseClientConfiguration and
    ConcourseServerConfiguration in the Java driver, such as setPassword,
    shortened a value in the same way. Now concourse config write and the
    setters write each value exactly as given.
  • Fixed a bug that allowed an await that writes (awaitFindAndSet,
    awaitSelectAndSet, or awaitGetAndSet) to keep running long past its
    timeout while other writes to a record that it matched kept its own write from
    committing. Such an await returns an empty result by its timeout and writes
    nothing.
  • Fixed a bug that caused an operation that Concourse Server runs atomically,
    such as a selectAndSet or a select with a condition, to try again at once
    each time a concurrent write kept it from committing. When many clients
    competed for the same records, each of those operations kept a CPU core busy,
    which slowed every other read and write on the server. Such an operation waits
    before it tries again. While another write holds data that it needs, it waits
    for that write to finish, without using the CPU. Otherwise, it waits a short
    time.

v1.1.1

  • Fixed a bug that caused CCL with a skip clause and no limit clause (e.g.,
    find age > 30 skip 5) to fail with a NullPointerException when parsed. The
    failure happened in Command.parse, in exec and submit with a CCL string,
    in CaSH, and in Concourse Server when a client sent the CCL. It also happened
    when parsing the CCL that ccl() returns for a Command paged with
    Page.skip or Page.offset, because that CCL has a skip clause and no
    limit clause. Now, such CCL parses to a Command that skips the specified
    number of results and returns all remaining results.

  • ConcourseCommandDriver is an abstract Concourse implementation that
    converts each method call that has a Command equivalent into that Command
    and passes it to submit(List<Command>), which a subclass implements. So a
    program can provide the full Concourse API over its own transport (e.g.,
    relaying each Command to another process that holds a Concourse Server
    connection) without implementing each Concourse method. For a given list of
    commands, the subclass's submit must return the same results, in the same
    order, that submit returns on a connection from Concourse.connect(). Each
    Concourse method that corresponds to a single Command (e.g., find,
    add, stage, commit, a calculation, or an await) calls submit exactly
    once. The subclass also implements exit, getServerEnvironment,
    getServerVersion, invokePlugin, and copyConnection, which have no
    Command equivalent. manage() throws an UnsupportedOperationException.

    public final class RelayedConcourse extends ConcourseCommandDriver {
    
        @Override
        public List<Object> submit(List<Command> commands) {
            return relay.submit(commands);
        }
    
        // exit, getServerEnvironment, getServerVersion, invokePlugin and
        // copyConnection
    }
    
    Set<Long> contacts = new RelayedConcourse().find("kind = contact");
  • The describe, browse, holds, trace, clear, and revert command
    builders accept a Collection of records or keys as an argument. So do the
    steps of the add, set, remove, and insert command builders that take
    records (e.g., in(records)). This lets code that holds a Collection pass
    it directly instead of splitting it into a first item and the rest.
    Command.to().clearAll().from(records) builds a Command that clears every
    key in each record of records. A Command built with a Collection
    argument returns the same shape as the Concourse method that takes a
    Collection, even if the Collection contains a single item. For example,
    Command.to().describe(records) returns a Map<Long, Set<String>>, as
    describe(records) does.

    Command describe = Command.to().describe(records);
    Command add = Command.to().add("name").as("Ada").in(records);
  • Fixed a bug that caused some Command inputs containing single-item
    collections as arguments (e.g., the CCL describe [1]) to return the same
    shape as if the Command was provided the single item directly instead of
    within a collection. So describe [1] returned a Set<String> of the keys in
    record 1, as describe 1 does, instead of a Map<Long, Set<String>> from
    record 1 to its keys. This affected three kinds of input:

    • CCL with a single-item collection of records in an add, remove,
      insert, describe, holds, or trace command, when Command.parse,
      exec, submit, CaSH, or Concourse Server parsed it.
    • The CCL that ccl() returned for a select, get, navigate, link,
      await, or read-and-set Command built with a single-item collection. That
      CCL omitted the brackets (e.g., ccl() returned select name from 1 for
      Command.to().select("name").from(Collections.singletonList(1L))), so
      running it returned the single-item shape. equals also returned true
      for that Command and the Command built with the single item directly.
    • A TCommand with a single-item collection of records or keys, which
      CommandSerializer.fromThrift converted into a Command for the single
      item.

    Now, these inputs return the same shape as the Concourse method that takes a
    collection, and ccl() keeps the brackets (e.g., select name from [1]). The
    exception is CCL with a single-item collection of keys in a select, get,
    navigate, browse, await, or read-and-set command, or of destinations in a
    link command. That CCL still returns the single-item shape (e.g.,
    select [name] from 1 returns the same Set as select name from 1). Code
    that expects the single-item shape must provide the single item directly
    (e.g., describe 1).

  • Fixed a bug (GH-1575)
    that caused a CommandGroup method with a collection argument (e.g.,
    group.describe(records)) to record a separate Command for each item in the
    collection. So submit(group) returned one result per item instead of one
    result per method call. For example, if records contained three records,
    submit(group) returned three Set<String> results instead of one
    Map<Long, Set<String>>. This affected the add, set, remove, insert,
    clear, revert, browse, describe, holds, and trace methods. Now,
    each method call records one Command, and submit(group) returns one result
    for that call, with the same shape that the Concourse method with the same
    arguments returns. Code that reads the results of submit(group) by position
    must count one result per method call.

  • Fixed a bug (GH-1582)
    that allowed a command builder to accept an empty collection of records or
    keys and build a Command that ran as if the argument were omitted, so it
    read or wrote more data than requested. For example,
    Command.to().select(Collections.emptyList()).from(1) returned the values of
    every key in record 1, and
    Command.to().calculate("sum", "age").in(Collections.emptyList()) summed
    age across every record. A CommandGroup method with an empty collection
    argument recorded no Command, so submit(group) returned no result for that
    call. Now, every command builder and CommandGroup method with a collection
    argument throws an IllegalArgumentException if the collection is empty. Code
    that may pass an empty collection must check for it before the call.

  • Fixed a bug (GH-754) that
    caused a find Command with a timestamp (e.g.,
    Command.to().find(criteria).at(timestamp)) to fail with an
    InvalidArgumentException when a client ran it with submit or exec. Now,
    it returns the records that matched its condition at the timestamp, and it
    fails with a ParseException if its condition is not valid CCL.

  • Fixed a bug (GH-1573)
    that caused a jsonify Command with a timestamp (e.g.,
    Command.to().jsonify(records).at(timestamp)) to fail with an
    InvalidArgumentException when a client ran it with submit or exec. Now,
    it returns the JSON of the records as of the timestamp.

  • Fixed a bug that caused calculate(String, Object...) (e.g.,
    calculate("sum", "age")) to throw an IllegalArgumentException on an
    instance of a Concourse subclass that overrides calculate(), even though
    calculate().sum("age") worked on the same instance. Now,
    calculate(String, Object...) invokes the named method on the Calculator
    that calculate() returns.

v1.1.0

Read and Set Operations

Concourse now provides new atomic operations to look up the records that match a
condition and set a key as a value in each of them.

  • findAndSet returns the records that were updated.
  • selectAndSet returns all the values that each updated record held for one or
    more keys (or every key) right before the set.
  • getAndSet returns the most recent value that each updated record held for
    one or more keys (or every key) right before the set.

Each of these operations supports sorting and pagination. When an Order is
given, the matching records are sorted before a Page picks which of them to
update, and the results come back in that order. Without a Page, every
matching record is updated. Both selectAndSet and getAndSet include every
updated record in their results, even one that doesn't have any of the requested
keys.

selectAndSet and getAndSet can also read a single key, just like select
and get. Then the result maps each record straight to that key's values. The
one exception to the rule above is a getAndSet of a single key, which leaves
out a record that doesn't have the key, just like get does.

An invalid key, or a blank or function value, causes the operation to fail even
when no records match. The operation also fails if the value is a link from one
of the updated records to itself.

For example, this sets the status of the highest-priority pending job to
claimed and returns the job's payload:

Map<Long, Map<String, Set<Object>>> jobs = concourse.selectAndSet(
        Lists.newArrayList("payload"), "status = pending",
        Order.by("priority").descending(), Page.limit(1), "status",
        "claimed");

The same operation can also be written as a CCL command or built as a Command:

selectAndSet payload where status = pending order by priority desc limit 1 set status as claimed
Command command = Command.to().selectAndSet("payload")
        .where("status = pending").order(Order.by("priority").descending())
        .page(Page.limit(1)).set("status").as("claimed");
Awaits

Concourse now provides await operations that wait for a read to return data.
Previously, a client that needed to wait for data, such as a worker waiting for
a new job, had to poll by repeating a read until something came back. An await
does the waiting on the server and returns as soon as there's a result.

There's an await version of find, select, and get with a condition
(awaitFind, awaitSelect, and awaitGet), and of each new read and set
operation (awaitFindAndSet, awaitSelectAndSet, and awaitGetAndSet). An
await takes a timeout, followed by the same arguments as the operation it waits
on. If the result is already non-empty, the await returns it right away.
Otherwise, it waits until a write makes the result non-empty or the timeout
passes. At the timeout, it returns whatever the result is at that time, which
may be empty. The await versions of the read and set operations wait for a
non-empty result and then do the lookup and the set atomically.

  • An await fails with an InvalidArgumentException if:
    • it's called inside a transaction,
    • its condition, keys, or order use a key that isn't writable, such as a
      navigation key,
    • its condition compares a key to a function value, or
    • its timeout is shorter than one millisecond or longer than the
      max_await_timeout setting (60 seconds by default).
  • The server allows at most max_open_awaits awaits (1,000 by default) to be
    open at once. Beyond that, a new await fails with an AwaitLimitException and
    can be retried later. Both limits can be changed in concourse.yaml:
    max_await_timeout: 30000 # milliseconds
    max_open_awaits: 500
  • Awaits work in a distributed cluster, so a write on any node can end an await
    on any node.
  • If a client disconnects while the await version of a read and set operation is
    waiting, the server may still do the set without anyone getting the result.
    So it's best to set a value that can recover on its own, such as a lease
    that expires.
  • The new com.cinchapi.concourse:type=Awaits MBean reports the number of open
    awaits, read evaluations, timeouts, and wake latency. When
    monitoring.export_metrics is enabled, these are also exported as
    concourse_awaits_* metrics.
  • Each await is also a CCL command, with its timeout in a within clause such
    as within "30 seconds". Awaits can also be built with Command.to() and
    recorded in a CommandGroup.

For example, this waits up to 30 seconds for a pending job and then marks it as
claimed:

Set<Long> jobs = concourse.awaitFindAndSet(Duration.ofSeconds(30),
        "status = pending", Page.limit(1), "status", "claimed");

The same await can also be written as a CCL command or built as a Command:

awaitFindAndSet within "30 seconds" for status = pending limit 1 set status as claimed
Command command = Command.to()
        .awaitFindAndSet(Duration.ofSeconds(30), "status = pending")
        .page(Page.limit(1)).set("status").as("claimed");
Effectively Equal Values of Different Types

Concourse treats effectively equal values of different types as being the same.
Numbers are effectively equal when they have the same value, such as 18, 18L
and 18.0, and a Float is effectively equal to the Double with the same decimal
digits. A Tag and a String are effectively equal when their text is exactly
the same, including its case. Previously, each part of Concourse Server applied
that idea in its own way. So the same write could succeed or fail, and the same
read could return different values, depending on whether the data was indexed
yet. Now, one set of rules applies everywhere.

  • A field cannot simultaneously hold two values that are effectively equal to
    one another. For example, if a field holds 18, adding 18.0 fails, and if
    it holds the String jeff, adding the Tag jeff fails.
  • A remove succeeds if it matches a stored value that is equal or effectively
    equal to the supplied value. The field's history records the stored value, not
    the supplied one, so search and every other read reflect the removal.
  • Setting a field to an effectively equal value of another type replaces the
    value that the field holds. For example, if a field holds 18, setting it to
    18.0 leaves it holding 18.0, inside or outside of a transaction.
  • reconcile counts a value that a field holds as already there if it's
    effectively equal to one you pass, so it leaves that value in place with the
    type it was written with. For example, if a field holds 18, reconcile with
    18.0 leaves it holding 18. To change only the type of a value, use set.
  • Directly retrieving the values from a record (e.g., select) always returns
    the types that were written, even if they diverge across records. For example,
    a field that holds 18 never returns 18.0. The Java driver still reads a
    Tag back as a String. In the same way, a diff of a record reports a set
    from 18 to 18.0 as a change, and a revert to a time before that set
    brings back 18.
  • When different records hold effectively equal values, a read across a key
    (e.g., browse) returns one representative value and maps it to all of those
    records. For example, if one record holds 18 and another holds 18.0,
    browse maps one of them to both records. A diff, min or max of a key
    works the same way.
  • = and the range operators match effectively equal values of any type, and
    search, CONTAINS and NOT_CONTAINS only consider String values. A
    Boolean isn't equal to text, so a query for the String "true" doesn't
    match the Boolean true. Previously, it did once the data was indexed.

By default, the representative value has one of the types it was written with,
but the representative type that is chosen is undefined and may change across
calls depending upon the total state of the data under that key. If you enable
the new enable_canonical_type_coercion preference, these reads convert each
representative value to its canonical type instead, which means a whole number
becomes an Integer (or a Long if it's too big for an Integer), any other
number becomes a Double, and a Tag becomes a String.

enable_canonical_type_coercion: true

These rules fix several bugs.

  • Adding 18.0 to a field that held 18 was refused while 18 was in the
    buffer, but accepted once 18 was indexed, so a field could hold both.
  • Removing 18.0 from a field that held 18 was refused once 18 was indexed.
    While 18 was still in the buffer, the remove reported success and verify
    agreed, but select still returned 18.
  • Removing a String by passing a Tag with the same text left the String in
    the search index, so search and CONTAINS still matched the record. And
    removing a Tag by passing a String could hide the field's other values from
    search. For example, after the Tag jeff was removed from a field that also
    held jeffrey, a search for jeff no longer found the record.
    (GH-968)
  • A String and a Tag with the same text could be mixed up when both were
    indexed at around the same time, even under different keys or in different
    records. The String could be read back as a Tag, or the Tag as a String,
    and a historical CONTAINS could return too few or too many records.
    (GH-827)
  • A select that used a key in its condition or order could return a Tag as a
    String, or 18.0 as 18. This happened whenever an effectively equal value
    of the other type was written first.
    (GH-827)
  • browse, and the min or max of a key, failed with an internal error when
    one record's value was indexed and an effectively equal value of another type
    in another record wasn't indexed yet.
  • In a transaction, setting a field that held a Tag to the String with the
    same text left the field holding the Tag, although the same set outside a
    transaction stored the String.

Upgrading to this version checks the stored data, one field at a time, for
writes that break these rules. It only rewrites the data files that contain one,
and leaves the rest as they are. An earlier version could let a field hold
effectively equal values of different types, so the upgrade keeps the one that
was added first. To do so, it drops the add of the second value and any remove
of either value while the field still held the other. If a remove named an
effectively equal value of another type, the upgrade rewrites it to name the
value that the field held, so search sees the removal. If the upgrade stops
part way, it finishes the same plan the next time it runs.
concourse data repair applies the same rules to the stored data.

Search and Text Matching

Search, the CONTAINS and NOT_CONTAINS operators, and every comparison of
text now follow one set of rules. Previously, the same query could return
different records depending on whether the data was indexed yet, whether it was
read at a past timestamp or inside a transaction, and which locale or version of
Java ran Concourse Server.

  • A search now only matches when the words appear in order and next to each
    other within a single value, consistent with the CONTAINS operator. For
    example, a search for foo bar previously matched a record whose name
    values were foo x and y bar. Search results are ordered by how many times
    the query matches a record, and that count now includes every matching value
    in a field.
  • Concourse Server now stops reading the search index for a multi-word search
    as soon as no record can match the query. Previously, it read the index for
    every word in the query, even after an earlier word had already ruled out
    every record.
  • A find query that uses the CONTAINS operator at a past timestamp, or the
    NOT_CONTAINS operator at any time, now answers from the search index.
    Previously, it matched the query against the text of every distinct value that
    the key held.

This release also fixes these bugs in search and text matching:

  • Fixed several bugs where search returned different results depending on
    whether the matching data existed in long-term storage or the buffer. The root
    cause was a discrepancy in the tokenization logic between the stores. Search
    now splits text and ignores its case the same way for both. These bugs were
    fixed:
    • Search ignored case incorrectly when the server's default locale lowercases
      letters differently. For example, with a Turkish default locale, a search
      for title didn't find indexed values that contained TITLE.
    • The search index only split words at ASCII whitespace. So, a search for
      foo bar didn't find an indexed value whose words were separated by another
      whitespace character, such as an ideographic space.
    • The search index dropped control characters at the edges of each indexed
      substring. So, a search query that ended with a control character didn't
      find indexed values that contained it.
    • A search query that started with whitespace didn't find any indexed values.
    • A search query could match half of an emoji or another character outside the
      Basic Multilingual Plane. For example, a search for a? found an indexed
      value of a😀b.
  • Fixed a bug where a search for a word longer than the
    max_search_substring_length setting could return results, although such a
    search should return no results. Concourse Server indexed substrings one
    character longer than the setting, so a search for a word of that length
    matched indexed data. A search also matched data that was not yet indexed, no
    matter how long its words were. Each word longer than the setting also took
    more index space than it needed. Now, the longest indexed substring has
    exactly max_search_substring_length characters, and a search for a longer
    word matches no data, whether or not it is indexed. A CONTAINS or
    NOT_CONTAINS condition follows the same rule, so no value contains a query
    with a word longer than the setting. This also holds for data that was indexed
    while the setting was higher.
  • Fixed a bug (GH-929) where
    the CONTAINS and NOT_CONTAINS operators didn't follow the matching rules
    of the other operators. So the same query could return different records on
    current and historical data, or inside and outside of a transaction. Now, both
    operators only consider String values, just like search, and a query
    returns the same records in every case.
    • A number, Tag, Link or any other value that isn't a String never matches
      either operator. Previously, a historical query or a function key could fail
      with an internal error when it reached such a value.
    • NOT_CONTAINS matches a record when any of its String values doesn't
      contain the query, just like !=. Previously, on current data, it matched
      every record that had no value containing the query, including records that
      didn't have the key at all.
    • A query value that isn't a String is read as text. For example,
      address contains 5 matches a record whose address is "Apt 5".
  • Fixed a bug where search, and a CONTAINS condition on current data, could
    return the wrong records when a record had writes that weren't indexed yet, or
    writes inside a transaction. If such a write removed a matching value, the
    record still matched. If it added a second matching value, the record stopped
    matching.
  • Fixed a bug where a CONTAINS condition missed a match that started partway
    through a partial match, such as a a b in a a a b, although a search for
    the same query found it.
  • Fixed a bug where a find query that used the NOT_CONTAINS operator
    returned the opposite of the correct records for any data that was not yet
    indexed into long-term storage. A recently written record whose value
    contained the query string was returned, and one whose value did not contain
    it was left out. Data that was already indexed matched correctly, so the same
    query could return different records before and after indexing, and a query
    whose data was split across both returned a mix of the two. NOT_CONTAINS now
    matches only the records whose values do not contain the query string,
    wherever the data resides.
  • Fixed bugs where comparisons of text ignored case in different ways. Concourse
    Server took its case rules from the version of Java that ran it and, for some
    operators, from the server's default locale. Now, the rules are based on the
    Unicode Standard and ship with Concourse, so EQUALS, NOT_EQUALS, the range
    operators and search agree under every locale and version of Java.
    • A record that held İSTANBUL matched both city = istanbul and
      city != istanbul. On a server whose default locale was Turkish, the same
      was true of any text with a capital I, such as INFO.
    • A range condition could include or skip a value that differed from the bound
      only in case. For example, city > istanbul matched İSTANBUL, and
      unit >= μ missed the micro sign µ.
    • word = 𐐀 missed a record that held 𐐨, because comparisons didn't
      ignore the case of letters outside the Basic Multilingual Plane.
    • Moving a server to another version of Java could make a search miss stored
      text in a script whose case rules changed.
Storage Format Update

Concourse Server stores data on disk in Storage Format v3, and this version
moves that format to schema iteration 2. Schema iteration 2 makes the following
changes:

  • Each entry in the search index now records a fingerprint of its corresponding
    value, so a search can distinguish between multiple values stored in a field.
  • Each data file stores its revisions more compactly. Revisions that share a
    record and key are stored together, so the record and key are written once for
    the whole group instead of once for every revision. Additionally, each
    revision's timestamp is stored as the difference from the one before it, so it
    takes fewer bytes.
  • The bloom filter for each data file is now sized to its actual contents,
    targeting a false positive probability of 0.001%, down from 3%. Previously,
    bloom filters were sized from heuristic estimates, which left them either
    oversaturated or needlessly sparse. Each filter also holds only the entries
    that reads look up in it, so the index filter grows with the number of keys
    and the search index filter grows with the number of distinct terms, instead
    of with every write.
  • The storage metadata that tells a read where to look in a data file has been
    drastically reduced, so it takes a small fraction of the space it previously
    occupied, both in memory and on disk. Previously, this metadata could take up
    more space than the data itself and could be evicted under GC pressure, so
    later reads had to load it from disk again. Now, the metadata is small enough
    to load eagerly and keep in memory. Because it's never evicted, the memory it
    uses grows with the amount of data you store. A read may now scan up to about
    4 KB of data that it doesn't need, but that costs far less than reloading
    evicted metadata from disk.
  • Each data file stores checksums of its contents, so Concourse Server can
    detect data that was damaged on disk.

Together, these changes reduce the disk space that the same data takes up by
roughly 40 to 60 percent. Most of that space is the search index, so the
savings grow with how often the same words appear across records. Reads are as
fast as before or faster, and the memory that reads use drops by more than
80%, because the metadata that was previously loaded, evicted, and loaded
again is now small enough to stay in memory.

Durability and Crash Safety

Every write that Concourse Server acknowledges now survives a crash, and the
server detects data that was damaged on disk instead of returning a wrong
result.

  • Concourse Server now checks its data files for damage.
    • Each data file stores checksums of its contents. To check every data file on
      demand, run concourse data verify. It lists each damaged file while reads
      and writes continue. To also check data as it's read, set
      verify_data_integrity_on_read to true. Each read then checks every group
      of revisions that it loads from disk, and a read of damaged data fails
      instead of returning a wrong result, while the server log names the damaged
      file. The setting is false by default because it adds work to each read
      from disk, and it can be changed without rewriting any data files:
      verify_data_integrity_on_read: true
    • Concourse Server checks each data file when it opens, so it can detect
      damage to essential metadata. When it finds damaged files, the server
      refuses to start the environment and reports each affected file, so you can
      restore those files from a backup. For the default environment, that means
      Concourse Server refuses to start. Previously, Concourse Server skipped any
      data file that the storage engine couldn't read, which left that file's data
      out of every result.
  • Concourse Server now writes data files more safely, so a crash in the middle
    of a write can no longer leave the data in an inconsistent state
    (GH-901). Previously,
    Concourse Server wrote each new data file under its final name from the start.
    So a crash, such as a power loss, while a data file was being written could
    leave a partly written file behind, and the next start could read it as if it
    were complete, which meant that some of the data in that file could go
    missing. Now, a data file takes its final name only after every byte of it is
    on disk and Concourse Server is ready to use it, so a crash at any point
    leaves either the whole file or none of it. The data that was being written is
    still in the Buffer or in the data files it was built from, and the next start
    reads it from there.
  • By default, a transaction no longer writes a backup file when it commits.
    Previously, a transaction that changed data stored a backup of its writes,
    synced it to disk before it applied them, and then deleted it. Now, a
    transaction's writes reach the disk together, so a crash leaves all of them or
    none of them, and every acknowledged commit is durable without a backup. The
    new transactions.recover_interrupted_commits setting brings the backup back,
    so that more interrupted commits can be recovered when Concourse Server
    restarts. It has significant overhead and is generally not recommended. With
    it on, recovery replays a backup only when all of it is intact, so a
    transaction is either applied completely or not at all
    (GH-801). That includes a
    backup that a crash cut off right between two of its writes, which 1.0.5 can't
    tell apart from a complete one. A backup that an earlier version left behind
    is still recovered.

This release also fixes these bugs in crash safety:

  • Fixed bugs where a client could see a write before it was durable, so an
    abrupt machine failure could erase data that a client had already seen. Now, a
    write becomes visible only after it reaches disk.
    • A commit handed its writes to storage and flushed them to disk afterwards. A
      read at a timestamp or a full-text search could see them in between, because
      neither waits on the locks that a commit holds. This applied to an explicit
      transaction and to any operation that Concourse Server performs atomically,
      such as set, clear, insert, and reconcile.
    • A new record entered the record inventory before the write that created it
      reached disk. For example, an add without a record could refuse to write
      to a record that did not survive the failure.
    • A real-time plugin received each write event as soon as the write was
      accepted, and events could arrive in a different order than the writes. Now,
      events reach a plugin only after the write is durable, in the order the
      writes were made.
  • Fixed a bug (GH-802) where
    a crash while Concourse Server was storing a write could prevent the server
    from starting, or could cause a corrupted write to be stored permanently.
    Additionally, if a crash interrupted an atomic operation that wrote multiple
    values, the server could restart with only some of those writes. Now,
    Concourse Server restarts with every write that it acknowledged and drops the
    incomplete group of writes that it was storing when it crashed, so every
    atomic operation remains all or nothing. If Concourse Server finds a Buffer
    page that is damaged in a way a crash can't cause, it refuses to start and
    names the damaged page. That includes a page whose header and writes disagree
    on which page it is. A damaged page header is restored from the page's intact
    writes.
  • Fixed a bug where a crash shortly after Concourse Server created a transaction
    backup, atomically replaced a storage file, or stored the first writes on a new
    Buffer page could make the file system forget the new file or undo the
    replacement. Now, Concourse Server also syncs the directory that holds such a
    file before any write in it is acknowledged, so the change survives a crash.
    On platforms that can't sync a directory, this protection is best effort.
  • Fixed a bug where Concourse Server kept accepting writes after a flush of the
    Buffer to disk failed. The disk may report a later flush as complete without
    the data of the failed one, so writes that clients had already read could
    disappear after a restart. Now, Concourse Server refuses every write after a
    failed flush until it restarts. Reads continue, and the restart loads whatever
    the disk holds.
  • Fixed a bug (GH-865) where
    Concourse Server's inventory of records could lose information if a single run
    of the server wrote more than 98,304 new records. The inventory file overwrote
    part of itself, so after the next restart, operations that consult the
    inventory, such as inventory and a find with a negated condition, left
    those records out even though their data was intact. The upgrade rebuilds the
    inventory of every environment from its stored data, so the missing records
    come back. Now, the inventory file carries checksums, and Concourse Server
    rebuilds it from stored data whenever it is lost or damaged.
  • Fixed a bug (GH-684) where
    stopping Concourse Server didn't wait for the background indexing of recent
    writes to end. The indexing could keep changing the Buffer and the data files
    after the server reported that it had stopped, and the process could exit in
    the middle of that work, as if it had crashed. Now, a stop returns only after
    all indexing has ended. Indexing that is already moving a batch of writes into
    long-term storage finishes, and any other indexing stops and removes the files
    it wrote.
Configurable Trash Handling

Concourse Server no longer deletes a data file as soon as it retires it.
Previously, Concourse Server deleted the original of each data file that a
repair or a reindex replaced, and only a start moved a data file to the trash,
when another data file held all of its data. Now, whenever Concourse Server
retires a data file, it moves the file to the trash, so the data isn't lost if
that decision turns out to be wrong.

A data file stays in the trash for one week, and then Concourse Server deletes
it. The new concourse data prune command empties the trash of an environment
at any time, and the new storage.trash.retention preference sets the number of
hours that a data file stays in the trash. A negative value keeps each data file
until concourse data prune deletes it. A value of 0 deletes each data file
right away instead, and it also empties the trash when Concourse Server starts.

storage:
  trash:
    retention: 720 # 30 days
Upgrading to 1.1.0

Upgrading to this version requires Concourse Server 0.11.0 or later. To upgrade
from an earlier version, first upgrade to a 0.11, 0.12 or 1.0 release, and then
upgrade to this version. Data from before 0.10.6 must be upgraded with 0.10.6
before that.

The upgrade rewrites every data file in schema iteration 2, so it's important to
allocate downtime for the upgrade to finish. Unless storage.trash.retention is
0, the upgrade keeps a copy of each original in the trash, so it needs as much
free disk space as the data files already take up. The upgrade checks for that
space before it rewrites anything, and it stops if the disk doesn't have room.

Along with the new storage format, the upgrade:

  • rebuilds the indexes by the new rules for splitting text and ignoring case,
  • rewrites the stored writes that break the rules for effectively equal values,
    as described above,
  • rebuilds the record inventory of each environment from its stored data, and
    keeps the previous inventory file as inventory.bak beside it,
  • adds checksums to each Buffer page, and
  • moves each leftover data file that only repeats data held elsewhere to the
    trash.

An upgrade that moves data to a new storage format now continues where it
stopped if it does not finish. Previously, if the upgrade failed or Concourse
Server stopped before it finished, the next start began the upgrade again from
the first data file. On a large database, an upgrade that took longer than a
startup limit, such as a Kubernetes startup probe, could never finish.

The upgrade now rewrites each data file on its own, and each data file holds
either its original data or its rewritten data, even if Concourse Server stops
part way. The next start continues with the data files that still need the
upgrade. The log reports each data file that the upgrade rewrites, such as
(23 of 56 in default). The first number counts the data files of the
environment that the upgrade has finished, and the second counts the ones that
needed the upgrade when it started, so you can see how far the upgrade has
progressed.

The upgrade is also faster on a large database, because it rewrites several
data files at once. It starts with half as many at once as the server has
processor cores, and at least two. Whenever the heap is nearly full, it rewrites
fewer at once, so that the extra speed does not run the server out of memory.

Compaction

Compaction is now on by default, and it merges data files by size tier. Each
transport from the Buffer writes one data file, and every uncached read,
find, and search examines every file. Without compaction, an environment
that received millions of writes held tens of thousands of files and point
reads took tens of milliseconds. Compaction merges files that hold a comparable
amount of data into one larger file, which then joins the next tier. Because of
this, the number of files an environment holds grows with the logarithm of the
data it stores rather than with the number of writes, and such an environment
stays at a few dozen files.

A compaction pass offers the largest group of files first, so the first merges
happen as soon as enough files accumulate. A run of files at the end of an
environment waits until enough of them accumulate, so a newly written file does
not cause the files before it to be rewritten. Every revision is preserved,
because a merge changes how the data is arranged, never what it contains.

Compaction is safe to leave on:

  • A merge builds its result in the background and pauses reads and writes only
    for the moment it swaps the merged file in. The files it replaces go to the
    trash as soon as the merged file is live.
  • A crash at any point during a merge leaves every write readable after a
    restart. A merged file becomes visible only once it is complete, and a
    restart keeps the merged file and moves the files it replaced to the trash.
  • A merge builds its result in memory and moves that data to temporary files
    when the Java heap fills up, whatever the storage.spill.heap_usage_threshold
    setting is, so the heap never has to hold the whole result. A merge whose
    result would be larger than compaction.max_file_size (1 GB by default) or
    than a quarter of the heap, or that would leave less than
    compaction.disk_headroom (1 GB by default) of disk space available, is not
    performed.
  • A merge that fails for any reason, including an out of memory error, is
    abandoned and reported in the compaction metrics, and compaction continues
    with the next group of files.
  • Stopping Concourse Server waits for a merge in progress to finish or stop, so
    no data file changes after the stop.
  • Scheduled compaction yields to transport. While more than
    compaction.max_backlog Buffer pages (4 by default) wait for transport,
    scheduled merges pause until the transporter catches up, so compaction never
    competes with a backlog of writes. A full compaction, including one started by
    concourse data compact, runs regardless.

The files that a merge replaces go to the trash, so compaction frees disk space
only once they leave it, after one week by default or when concourse data prune runs. Until then, an environment that compacts uses more disk space than
one that does not.

The compaction settings in concourse.yaml control the fan in, the largest
file a merge may produce, the disk space a merge must leave free, the backlog at
which scheduled compaction pauses, and how often compaction runs.
compaction.enable turns compaction on or off, and it overrides
enable_compaction when both are set.

enable_compaction: true
compaction:
  fan_in: 4
  max_file_size: 1GB
  disk_headroom: 1GB
  interval: 2
  max_backlog: 4
  full_interval: 604800

concourse monitor compaction and the EngineStats JMX bean report the merges
performed and failed, the files retired, the bytes read and written, the average
and longest shift time, the last failure and its time, and the number of files
in each tier.

This release also fixes these bugs in compaction:

  • Fixed a bug (GH-874,
    GH-1002,
    GH-1049) where compaction
    left the data files it merged in place, so every restart loaded the stale
    files and logged a duplicate data warning for each one.
  • Fixed a bug (GH-1050)
    where concourse data compact ran a single compaction shift, which usually
    merged nothing, and said nothing when the enable_compaction setting was
    false. The command now runs a full compaction, so every eligible merge
    happens before it returns, and it fails with a message that names the setting
    when compaction is disabled.
  • Fixed a bug (GH-877,
    GH-878) where compaction
    never reduced the number of data files, even when the enable_compaction
    setting was true. Three separate faults kept it from finishing any useful
    work. The built-in strategy merged two files only when their contents were
    estimated to overlap heavily, which almost never happens on a real workload. A
    full compaction, which runs on a weekly schedule, returned after the first
    merge it attempted, however many groups of files were eligible. And a
    compaction pass offered the strategy every group size, from a single file up
    to every file in the environment, even though that strategy only ever merged
    pairs; because each attempt takes one turn of a slow background schedule,
    nearly every turn was spent on a group the strategy could not use, and a
    single pass over an environment holding tens of thousands of files could take
    years.
  • Fixed a bug where compaction stopped for the life of the server the first time
    a merge failed, and reported nothing when it did. A merge can fail for an
    ordinary reason, such as an administrative repair replacing one of the files
    it was reading. The failure escaped the scheduled compaction task, which
    caused the scheduler to cancel every later run of that task, so both the
    frequent incremental schedule and the weekly full schedule went silent until
    the server was restarted. The failure also left the pass pointed at the same
    group of files, so a compaction started by hand, including through
    concourse data compact, attempted the same failing merge again.
  • Fixed a bug (GH-879) where
    every read and write in an environment stopped while compaction merged data
    files, even though the enable_compaction documentation promised that
    compaction would not disrupt them. A merge rewrites all of the data in the
    files it combines and held the lock that guards the environment's data files
    for that entire time, so one merge could stall the environment for seconds and
    a full compaction could stall it for the length of every merge it performed.
  • Fixed a bug (GH-902) where
    the reconciliation of the Buffer and the data files at startup changed the
    list of data files without the lock that guards it, so a compaction that ran
    at the same time could leave a data file unreachable until the next restart.
    The reconciliation also left the file it discarded on disk, so every restart
    loaded and discarded it again. The reconciliation now holds the lock and moves
    the file to the trash.
  • Fixed a bug where Concourse Server kept a file handle open for every data file
    it deleted. The handle was released only when the server stopped, so the disk
    space the file occupied was not reclaimed until then, and a server that
    deleted many files could approach the operating system's limit on open files.
    Deleting a data file now closes every handle the server holds for it, so the
    space is reclaimed immediately.
Memory Use
  • Fixed a bug (GH-1132)
    where the memory that Concourse Server used for caching could grow well beyond
    the heap. Each cache in each environment was allowed to use up to half of the
    heap on its own, and so was the search cache for each searched key when
    enable_search_cache was on. So the caches could claim several times the
    heap, and the server depended on the JVM to reclaim cached data, which it only
    does after long garbage collection pauses when the heap is nearly full. Each
    cache also measured cached data by the size of that data on disk, which is a
    small fraction of the memory it takes in the heap. Now, every cache in every
    environment shares one memory budget, which is 60% of the heap by default. The
    budget counts the memory that cached data takes in the heap. When the budget
    is full, Concourse Server keeps the cached data that it expects to read again,
    based on how often and how recently it read that data. So a scan of many
    records no longer pushes out the data that is read often.

    The new storage.cache.heap_share preference sets the budget as a share of
    the heap, between 0 and 1. It defaults to 0.6, and 0 turns caching
    off.

    storage:
      cache:
        heap_share: 0.6
  • Concourse Server now bounds the memory that its cache of precomputed lookup
    keys uses. Previously, the cache grew without limit and retained a copy of
    every distinct record, key and value that was ever written or looked up, so a
    long-running server or a large import held several gigabytes that were never
    released. The cache now holds a fixed number of entries and discards the ones
    it has not used recently.

  • The record inventory has been optimized to use a consistent amount of memory
    per record, no matter how record ids are distributed. Concourse typically
    assigns each record id from the current timestamp and, previously, an id
    assigned more than about a second after the one before it took close to 1 KB
    of heap. So an application that created a million records one at a time over a
    month held about 1 GB of heap for the inventory alone. Now, each of those ids
    takes about 16 bytes, and ids assigned in a burst take less.

  • Concourse Server now writes a data file faster when there isn't room in memory
    to buffer it. Previously, it spilled the file's indexed data to temporary
    files and read it back to write the file. Now, it writes the file directly
    from the indexed data in memory.

Concourse Shell (CaSH)
  • CaSH now runs Groovy 4, so you can use current Groovy syntax, such as lambdas,
    at the prompt and in a run-commands file. CaSH includes the core language and
    the datetime, json, nio, sql, templates and xml modules. A script
    that uses a class that Groovy moved to a new package in version 3 or 4, such
    as groovy.util.XmlSlurper, which is now groovy.xml.XmlSlurper, must import
    it from its new package. concourse import also compiles a custom importer
    written in a .groovy file with Groovy 4, so the same package note applies
    to it.
  • On a file system with POSIX permissions, Concourse Shell now keeps its
    history file, ~/.cash_history, readable and writable by its owner only.
    Concourse Shell also never saves an input that calls createUser or
    Concourse.connect or mentions a password, and it drops any such input that
    an existing history file holds.
  • As you type, CaSH now suggests the rest of the newest history entry that
    starts with your input, in faint text after the cursor. Press the right arrow
    key or Ctrl+E to accept the suggestion, or Alt+F to accept its next word.
  • CaSH now lays out each interactive result to fit your terminal. A select
    across records is a table, any other map is a list of key and value pairs,
    and a find is a comma-separated list. Links show as @<record>, timestamps
    show to the microsecond, and long values wrap instead of being cut off. A
    table too wide for the terminal even with its columns shrunk opens in the
    pager at its full width, where the left and right arrow keys scroll sideways.
    Type :wide blocks to show each record as a block of key and value lines
    instead, and :wide scroll to return to the pager. A faint footer counts the
    rows and shows the elapsed time, and a blank line separates the output of each
    input from the next prompt. --run and piped scripts still print
    Returned '...' in 0.011 sec.
  • CaSH now shows changes in color: in the result of a diff, values that were
    added are green and values that were removed are red, and in the result of an
    audit, each revision that adds a value is green and each revision that
    removes one is red.
  • Type :at <time> in CaSH to look around your data as it was at that time,
    such as :at "last friday". Until you type :at now, each select, get,
    find, browse, describe, navigate, verify, calculate, jsonify and
    trace that doesn't name its own time reads as of that moment, including its
    where condition, and the prompt shows the time, as in
    [default/cash@2026-10-17 09:00:00]$. The time can also be microseconds or a
    timestamp as CaSH shows it, such as one that you copy from an audit, which
    lands on that exact revision. Writes and Groovy input run as written, so after
    each Groovy input, CaSH prints a note that it read the present.
  • CaSH now suggests values for a key only when the key holds at most 25,000
    values across all records. Before it lists a key's values, CaSH asks
    Concourse Server how many the key holds, so pressing TAB after
    where name = on a large key no longer makes the server send every value
    and record of that key.
  • CaSH tab completion now reuses its background connections to Concourse Server
    instead of logging in again for each lookup of keys or values, so completions
    arrive sooner and a long session doesn't leave a trail of short sessions on
    the server. After :reconnect, completion connects with the new connection's
    settings.
  • Type :edit in CaSH to open your previous input, even one that failed, in the
    editor that $VISUAL or $EDITOR names, or in a built-in nano if neither is
    set. When you save and quit, CaSH puts the edited text at the prompt, so you
    can review it before you press Enter to run it.
  • CaSH now pages long output itself, with the less that JLine provides,
    instead of running the less program. Paging works on Windows and in
    containers that don't have less, and pressing q before the end of a long
    result no longer prints the whole result again.
  • CaSH now has output formats. :format json writes each result as pretty
    printed JSON in the form that Concourse reads, so you can paste it into an
    insert; :format csv writes comma separated values; :format text writes
    the Returned '...' in 0.011 sec text; and :format table returns to the
    layout that fits the terminal. :format alone shows the current format. Pass
    --format to start concourse shell in a format, which also applies to
    --run and piped scripts, as in
    concourse shell --format json < report.cash. CaSH remembers the :format
    and :wide choices that you make at the prompt in ~/.cash_settings, so your
    next session starts with them.
  • CaSH now keeps the value that the last command or Groovy input returned in
    the variable _, so Groovy input can build on it, as in select("name", _)
    after a find. An input that fails or returns nothing leaves _ unchanged.
  • The CaSH prompt now shows :txn while a transaction is open, as in
    [default/cash:txn]$, so you can see that your writes are staged until you
    commit or abort.
  • While you type an open call of an API method in CaSH, such as find(, the
    status line now shows the method's overload signatures, so you don't have to
    press TAB to see what the method takes.
  • Type :watch [seconds] <command> in CaSH to run a read every few seconds, two
    unless you say otherwise, and see its latest result full screen, as with
    watch in a terminal. Press q or Ctrl+C to return to the prompt. CaSH
    refuses to watch a CCL command that writes.
  • CaSH now has a record explorer. Type :explore <record> to see the record
    full screen, with a line for each key and its values. Move between the lines
    with the arrow keys, press Enter to open the record that a line links to and
    the left

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

@jtnelson jtnelson closed this Nov 7, 2026
@jtnelson
jtnelson deleted the feature/deps-major-concourse branch November 7, 2026 17:45
@jtnelson
jtnelson restored the feature/deps-major-concourse branch November 7, 2026 17:47
@jtnelson jtnelson reopened this Nov 7, 2026
@cinchapi-agent
cinchapi-agent Bot force-pushed the feature/deps-major-concourse branch from 2f8cd53 to bca71cd Compare November 15, 2026 22:29
@cinchapi-agent
cinchapi-agent Bot force-pushed the feature/deps-major-concourse branch from bca71cd to 3978d83 Compare November 23, 2026 15:30
@cinchapi-agent
cinchapi-agent Bot force-pushed the feature/deps-major-concourse branch from 3978d83 to 13c7f4a Compare November 25, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant