Current section
20 Versions
Jump to
Current section
20 Versions
Compare versions
4
files changed
+22
additions
-7
deletions
| @@ -1,5 +1,13 @@ | |
| 1 1 | # Changelog |
| 2 2 | |
| 3 | + ## v0.7.4 (2026-04-13) |
| 4 | + |
| 5 | + ### Bug fixes |
| 6 | + |
| 7 | + * (#93) Fixed the Mapper used by GetMappedRange, critical for rare cases when the server attempts to fully tuple-decode |
| 8 | + an Incomplete Versionstamp in the value portion of the Index Entry instead of lazy evaluation. We believe this could |
| 9 | + cause Error 2042: "The value cannot be parsed as a tuple" in rare cases. |
| 10 | + |
| 3 11 | ## v0.7.3 (2026-04-06) |
| 4 12 | |
| 5 13 | ### Bug fixes |
| @@ -2,7 +2,7 @@ | |
| 2 2 | [{<<"GitHub">>, |
| 3 3 | <<"https://github.com/foundationdb-beam/ecto_foundationdb">>}]}. |
| 4 4 | {<<"name">>,<<"ecto_foundationdb">>}. |
| 5 | - {<<"version">>,<<"0.7.3">>}. |
| 5 | + {<<"version">>,<<"0.7.4">>}. |
| 6 6 | {<<"description">>,<<"FoundationDB adapter for Ecto">>}. |
| 7 7 | {<<"elixir">>,<<"~> 1.15">>}. |
| 8 8 | {<<"files">>, |
| @@ -186,7 +186,7 @@ defmodule EctoFoundationDB.Indexer.Default do | |
| 186 186 | # same transaction. So, we must choose either the key or the value of the index entry. |
| 187 187 | # A natural choice is to use the value to have the versionstamp so that |
| 188 188 | # get_mapped_range works correctly. However, then we lose the ability to manage the index |
| 189 | - # on updates and clears. Therefore, we must put the versionstamp in the index_key and |
| 189 | + # on updates and clears. Therefore, we must put the versionstamp in the index_key, |
| 190 190 | # which forces our mapper to inspect both the key and value to extract the pk. |
| 191 191 | # |
| 192 192 | # This means that the value portion of the index kv will always be written with an |
| @@ -393,18 +393,25 @@ defmodule EctoFoundationDB.Indexer.Default do | |
| 393 393 | """ |
| 394 394 | end |
| 395 395 | |
| 396 | - # See key-value design in get_index_entry |
| 397 396 | defp mapper(tenant, idx_len) do |
| 397 | + # (#93) We choose to extract all items from the Key, because when Versionstamps are in play, |
| 398 | + # the Value is not actually a valid tuple. It contains the incomplete versionstamp, which |
| 399 | + # which has a short trailing portion. If FDB allowed us to set_versionstamp_key_and_value |
| 400 | + # then we'd be free to define the mapper on either the key or the value. But since we are |
| 401 | + # forced to pick set_versionstamped_key, which must also extract the tuple items from the |
| 402 | + # Key. |
| 403 | + # |
| 404 | + # Also see key-value design in get_index_entry and set_index_entry for more details. |
| 398 405 | offset_fun = fn offset -> |
| 399 406 | [ |
| 400 407 | # prefix |
| 401 | - "{V[#{offset}]}", |
| 408 | + "{K[#{offset}]}", |
| 402 409 | |
| 403 410 | # source |
| 404 | - "{V[#{offset + 1}]}", |
| 411 | + "{K[#{offset + 1}]}", |
| 405 412 | |
| 406 413 | # namespace |
| 407 | - "{V[#{offset + 2}]}", |
| 414 | + "d", |
| 408 415 | |
| 409 416 | # pk: get it from the index_key because the versionstamp lives there, not in the value |
| 410 417 | "{K[#{offset + 5 + idx_len}]}", |
| @@ -4,7 +4,7 @@ defmodule EctoFoundationdb.MixProject do | |
| 4 4 | def project do |
| 5 5 | [ |
| 6 6 | app: :ecto_foundationdb, |
| 7 | - version: "0.7.3", |
| 7 | + version: "0.7.4", |
| 8 8 | description: "FoundationDB adapter for Ecto", |
| 9 9 | elixir: "~> 1.15", |
| 10 10 | start_permanent: Mix.env() == :prod, |