Commit Graph

1483 Commits

Author SHA1 Message Date
A.J. Beamon ea76eb2beb Transactions could change tenant ID part way through. The dummy transaction could set a new tenant ID but use the old tenant prefix. 2022-07-30 16:16:18 -07:00
Dan Lambright 83d23512d2
Track when version not found in version vector. (#7653)
* Track when version not found in version vector.

* Respond to comments

* include vv in event

* Respond to review comments.

* Fix bug where we logged too many lines
2022-07-28 18:26:15 -04:00
Junhyun Shim c6342a6e5b
Merge branch 'main' into features/authz 2022-07-27 20:51:32 +02:00
Junhyun Shim 27e2bf60c6 Handle case where exception is thrown before tenant prefix is prepended 2022-07-27 20:13:25 +02:00
Josh Slocum 77956dc7ae
Merge pull request #7639 from sfc-gh-jslocum/cf_metadata_rewrite
Change Feed Metadata Rewrite and adding targeted fault injection
2022-07-26 18:10:37 -05:00
Junhyun Shim 5169616b16 Fix unresolved merge conflicts 2022-07-27 00:38:16 +02:00
Junhyun Shim e2a3fedfc7
Merge branch 'main' into features/authz 2022-07-27 00:08:57 +02:00
Josh Slocum 8b5b7a9b92
Merge pull request #7689 from sfc-gh-jslocum/purge_fixes
Granule Purge Fixes
2022-07-26 17:02:24 -05:00
Josh Slocum ba31229797 addressing review comments 2022-07-26 16:37:06 -05:00
Junhyun Shim 6f9c87f2a5 Move dummy transaction flag to TransactionState
Also add more description of what the flag does and when it's set
2022-07-26 23:27:46 +02:00
A.J. Beamon 4c4eb3fc48
Merge pull request #7704 from sfc-gh-ajbeamon/add-comments-to-tenant-function
Add comments explaining the use of the TransactionState tenant() and hasTenant() functions
2022-07-26 14:01:50 -07:00
Junhyun Shim adc601e8a3 Simplify tenant-aware dummy transaction 2022-07-26 21:30:44 +02:00
A.J. Beamon d31324102d Add comments explaining the use of the TransactionState tenant() and hasTenant() functions 2022-07-26 10:17:57 -07:00
A.J. Beamon 7c2ed53aef Fix: during recovery, it was possible for tenant operations to briefly fail because the tenant mode is not known 2022-07-25 13:03:15 -07:00
Junhyun Shim 553e6aba75 Make dummy transaction commits tenant-aware
Dummy transaction commits are made when earlier transaction returned
commit_unknown_result or request_maybe_delivered, to affirm the status
of earlier transaction. Without tenant-awareness, these transactions
will fail due to lack of authorization in case of untrusted clients.
2022-07-25 18:20:37 +02:00
Josh Slocum ee1b0cdd43 making purge failures fail test 2022-07-23 13:10:03 -05:00
Xiaoge Su 25d9fa856c fixup! Update code per comments 2022-07-21 23:14:31 -07:00
Xiaoge Su 32b4968835 Add TraceEvent to the construction/destruction of DatabaseContext
This is to figure out why huge databaseLogger related TraceEvents
generated after 7.1 released.
2022-07-21 19:38:59 -07:00
A.J. Beamon 410f27412b
Merge pull request #7620 from sfc-gh-ajbeamon/make-tuple
Add a Tuple::makeTuple function to easily construct a tuple
2022-07-20 17:09:10 -07:00
A.J. Beamon fee131f24d
Merge pull request #7591 from sfc-gh-ajbeamon/key-backed-types-range-read-more
Add support for returning a more flag from key backed types' range reads
2022-07-20 15:57:50 -07:00
Josh Slocum fd9201f60b Merge branch 'main' into cf_metadata_rewrite 2022-07-20 07:55:00 -05:00
A.J. Beamon 537ceff8ac Remove the ability to configure a tenant subspace. Rename the prefixes used for tenant metadata. 2022-07-19 14:32:05 -07:00
A.J. Beamon 190ad8c7e9 Convert existing tuple usages to use Tuple::makeTuple() 2022-07-19 13:45:59 -07:00
Markus Pilman 1de37afd52
Make TEST macros C++ only (#7558)
* proof of concept

* use code-probe instead of test

* code probe working on gcc

* code probe implemented

* renamed TestProbe to CodeProbe

* fixed refactoring typo

* support filtered output

* print probes at end of simulation

* fix missed probes print

* fix deduplication

* Fix refactoring issues

* revert bad refactor

* make sure file paths are relative

* fix more wrong refactor changes
2022-07-19 13:15:51 -07:00
Dan Lambright 775ab3323e
update tag client cache on getKeyLocation (#7613) 2022-07-19 11:24:17 -04:00
Josh Slocum 2573c0018c cleanup after passing tests 2022-07-19 08:00:25 -05:00
Josh Slocum 4540e2879c Change Feed Metadata refactor to fix races, simplify model, and clean up code 2022-07-18 12:46:11 -05:00
Junhyun Shim ca29cd9f41 Make RequestStreams accept empty TenantInfo
+ Make Authz tokens survive Transaction resets
+ Make tokens explicitly resettable by assigning empty value to authz token TR option
+ Fill out missing trace for some failed token verifications
+ Trace non-sensitive token parts upon failed verification
2022-07-18 13:30:55 +02:00
A.J. Beamon 91949439d2 Add support for returning whether a key-backed type range read has more results or not. 2022-07-13 15:46:10 -07:00
Junhyun Shim 03a496c0e0 Make auth token survive transaction resets 2022-07-13 20:34:01 +02:00
Josh Slocum 0b0ac16a4c Merge branch 'main' into granule_merging 2022-07-12 09:09:30 -05:00
Markus Pilman 2edbcf2c65
Merge pull request #44 from apple/main
Merge main
2022-07-12 07:51:22 -06:00
Jingyu Zhou 58aa5a9e1d
Merge pull request #7539 from sfc-gh-fzhao/SetFetchKey
set isFetchKeys for getRangeStreamFragment
2022-07-11 13:25:24 -07:00
Junhyun Shim dbf8f98481 Apply Clang format 2022-07-11 17:10:45 +02:00
Junhyun Shim 61f3d14ec6 Add TokenCache test
Add function authz::jwt::TokenRef::toStringRef() for token tracing
Add StringRef::toStringView()
2022-07-11 13:42:41 +02:00
Markus Pilman 2ae17233d8 addressed review comments 2022-07-08 11:19:14 -06:00
Markus Pilman f268265d96
Apply suggestions from code review
Co-authored-by: A.J. Beamon <aj.beamon@snowflake.com>
Co-authored-by: Junhyun Shim <junhyun.shim@snowflake.com>
2022-07-08 10:42:44 -06:00
He Liu bc5bfaffda
Shard based move (#6981)
* Shard based move.

* Clean up.

* Clear results on retry in getInitialDataDistribution.

* Remove assertion on SHARD_ENCODE_LOCATION_METADATA for compatibility.

* Resolved comments.

Co-authored-by: He Liu <heliu@apple.com>
2022-07-07 20:49:16 -07:00
Fuheng Zhao 207082f03e comment out setting isFetchKeys 2022-07-07 12:55:25 -07:00
Fuheng Zhao 6e7603aa35 set isFetchKeys for getRangeStreamFragment 2022-07-07 11:14:11 -07:00
A.J. Beamon c4b0f6eaae
Add an internal C API to support connection to a cluster using a connection string (#7438)
* Add an internal C API to support memory connection records

* Track shared state in the client using a unique and immutable cluster ID from the cluster

* Add missing code to store the clusterId in the database state object

* Update some arguments to pass by const&
2022-07-07 10:12:49 +02:00
Markus Pilman 56541167c2 send token with tenant info object 2022-07-06 20:58:17 -06:00
A.J. Beamon 1e8225a19e
Merge pull request #7511 from sfc-gh-ajbeamon/add-subrange-support-to-tenant-special-keys
Update the tenant special keys submodule to support multiple sub-ranges
2022-07-06 10:33:14 -07:00
Sreenath Bodagala 037c06a688 Merge remote-tracking branch 'apple-upstream/main' 2022-07-01 04:51:17 +00:00
A.J. Beamon 2f67328a0c Update the tenant special keys submodule to support multiple sub-ranges. This will enable future work that allows configuring tenants at the same time as creating them. 2022-06-30 15:03:37 -07:00
Josh Slocum 48bcf6eaba
parameterizing min split size instead of hardcoding it to min_shard_bytes (#7404) 2022-06-30 12:28:22 -07:00
Sreenath Bodagala c74710f6d5 - Address a review comment
- Optiize out the code in DatabaseContext::getLatestCommitVersions()
in the case where the feature is turned off.
2022-06-29 10:13:08 +00:00
Markus Pilman 9d16260822 Merge remote-tracking branch 'origin/main' into features/authz 2022-06-28 13:13:51 -06:00
sfc-gh-tclinkenbeard 086e4bff06 Merge remote-tracking branch 'origin/main' into global-tag-throttling3 2022-06-28 10:18:13 -07:00
Sreenath Bodagala 0da13a7797 - Optimize out the version vector specific code (on the client)
when the version vector feature is disabled.
2022-06-28 09:17:53 +00:00