https://discord.cloudflare.com logo
Join Discord
Powered by
# r2
  • b

    Benjamin123

    03/03/2023, 11:21 AM
    Hey team, I tried to use R2 with Spark. It failed due to multi-part upload issue. However, I now have a problem: my bucket has 0 file in it but reports a size of 55GB and I can't delete it because both the UI/rclone/wrangler claim it's not empty. How can I solve the situation? I don't want to pay for this ghost space.
  • b

    Benjamin123

    03/03/2023, 11:22 AM
    And also if you tried to use R2 with spark S3A connector and have some advice on it, I'll be happy about it! Thanks!
  • s

    Sid | R2

    03/03/2023, 11:30 AM
    Try running a ListMultipartUploads and making sure all pending uploads have been aborted before trying to delete your bucket
  • b

    Benjamin123

    03/03/2023, 12:23 PM
    Awesome thanks - regarding the Spark question, is Spark a use-case tested on Cloudflare side? Is it something you want to support at some point?
  • s

    Sid | R2

    03/03/2023, 12:25 PM
    I personally haven't used it, but as long as it issues S3 requests that R2 supports, it should work! If you notice inconsistencies, please let someone here know!
  • b

    Benjamin123

    03/03/2023, 12:30 PM
    It seems that it uses S3 features unsupported by R2 - I'll continue to investigate. Thanks anyway!
  • k

    koudelka

    03/03/2023, 12:33 PM
    Ok so conditional put can be used for compare and swap like atomic updates; prevent two workers overwriting each other. Thanks!
  • s

    Sid | R2

    03/03/2023, 12:35 PM
    Mind sharing what they are? Just out of curiosity?
  • b

    Benjamin123

    03/03/2023, 12:40 PM
    The problem is that I don't manage to have the logs of the REST calls, but I've seen consistent failure with multi-part uploads. Also it seems that listing and deleting have issues. However, without the exact request, it's not useful information
  • s

    Sid | R2

    03/03/2023, 12:41 PM
    Ah sure, each (conditional) put is atomic, but two workers can still overwrite each other if you’re not careful 😄 The last write wins, if both workers’ put conditions evaluate to true
  • s

    Sid | R2

    03/03/2023, 12:42 PM
    Right. Multipart uploads should work, although ListParts comes to mind as something that isn’t supported yet, but should be pretty soon.
    b
    • 2
    • 39
  • k

    koudelka

    03/03/2023, 12:46 PM
    Not if they condition on the etag? Since one of them updating the file would change the etag
  • s

    Sid | R2

    03/03/2023, 12:46 PM
    Ah I see, yep that should work just fine then
  • l

    Lloyd

    03/03/2023, 6:30 PM
    Is operation B (get request) count including 404 request count? (not found file request)
  • d

    digitalpoint

    03/03/2023, 6:33 PM
    Yes, 404s are billable operations.
  • r

    rytilu

    03/03/2023, 6:43 PM
    My R2 public bucket assets (.png, .gltf, .json) load on all browsers and connections (anything desktop or laptop, Safari iOS) except occasionally they don't load on Chrome iOS. If I go to the Chrome settings and turn "Allow Cross-Website Tracking" on, or off, it appears to reset something which allows R2 assets to load again. Does anyone have any theories on what could be happening? I'm really close to switching to S3 just to return to sanity.
  • c

    Chaika

    03/03/2023, 6:51 PM
    You're loading them on a custom domain, I hope, and not r2.dev? If you're using r2.dev it's rate limited / not meant for production
  • r

    rytilu

    03/03/2023, 6:53 PM
    Yes, custom domain.
  • c

    Chaika

    03/03/2023, 6:53 PM
    Do you get an error page / error code or anything more then they just don't load?
  • r

    rytilu

    03/03/2023, 6:53 PM
    I can share whatever you need if you are curious about the settings
  • r

    rytilu

    03/03/2023, 6:54 PM
    The request just never returns and doesn’t time out.
  • r

    rytilu

    03/03/2023, 6:55 PM
    Once I flip "Allow Cross-Website Tracking" on or off, it continues to work on the same connection for a while.
  • r

    rytilu

    03/03/2023, 6:56 PM
    Might have something to do with caching. I can try turning Cache Development Mode on next time it happens to see if it has any effect.
  • c

    Chaika

    03/03/2023, 7:04 PM
    That's strange, I don't have an ios device to test with, but I would assume that's just blocking cookies or JS trackers and shouldn't have anything to do with normal asset requests. And it's just Chrome iOS? On IPhone both Safari and Chrome use the same underlying web framework/webkit, that sounds really strange to me if only one is doing it. Not sure if there's much I'll be find from poking around with it, but can you share the custom domain of your bucket?
  • r

    rytilu

    03/03/2023, 7:05 PM
    storage.iliad.ai
  • r

    rytilu

    03/03/2023, 7:06 PM
    It feels about as strange as it sounds. It has always worked on Safari and somewhat frequently stops loading on Chrome.
  • r

    rytilu

    03/03/2023, 7:07 PM
    There are definitely other differences between Chrome and Safari on iOS that cause frustrations like this, for instance inconsistencies in how they handle CORS and session data
  • r

    rytilu

    03/03/2023, 7:09 PM
    It seems likely to me that something is wrong with my settings though, because I'm just using a public bucket with the S3 API which must be one of the most common use cases of R2 and it's intermittently not working on a very popular method of browsing, so you'd think the problem is on my end somehow
  • r

    rytilu

    03/03/2023, 7:09 PM
    but I have no idea what I'm doing wrong if I am doing something wrong
  • c

    Chaika

    03/03/2023, 7:26 PM
    hmm yea not sure about that one. I tried reproducing it via browserstack (supposed real IOS devices running Chrome) and couldn't get it to not load. R2 Custom Domain forces its TLS/HTTP Settings over your zone's. There was an issue earlier #895794943182909470 with the BOM/Mumbai India cloudflare pop, if that's the pop you are closest to. Difficult to debug something off just "never loads", just weird
1...929930931...1050Latest