You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

RFC Title

To be Reviewed By: October 26, 2020

Authors: Dale Emery

Status: Draft | Discussion | Active | Dropped | Superseded

Superseded by: N/A

Related: N/A

Problem

What is this proposal solving? Why

Numerous Geode classes resolve relative file paths against the JVM’s working directory—the value of the user.dir  system property. Some classes do this explicitly, by resolving paths against the value of user.dir . Other classes refer to to the JVM’s working directory implicitly, either by using relative paths or by resolving paths against “.”  or “” .

Resolving files against the JVM’s working directory makes it impossible to test many Geode features in parallel outside of a container.

Every Gradle test worker JVM for a given task type (e.g. distributedTest) has the same working directory. When tests run in parallel outside of a container, if multiple tests write to the same file path relative to the JVM’s working directory, those tests all write to the same file. The tests interfere with each other, causing swarms of failures.

Anti-Goals

What is outside the scope of what the proposal is trying to solve?

Solution

Make Geode resolve relative paths against a configurable path defined by a new geode.working-dir  system property.

Instead of accessing the property directly, Geode code will get the working directory from a new WorkingDirectory  class, by calling static methods that return the working directory as a java.nio.file.Path  or a java.io.File. To maintain Geode’s current behavior, these methods return the value of user.dir  if geode.working-dir  is not set.

Optionally (TBD): These methods can ensure that the returned path is canonical (as defined by the java.io.File  documentation) and that it refers to an existing directory.

Changes and Additions to Public Interfaces

This proposal adds a new public system property: geode.working-dir .

Any documentation that refers to user.dir will need to refer instead to geode.working-dir .

Performance Impact

I expect that the additional cost to resolve paths to a canonical path will be minimal.

Backwards Compatibility and Upgrade Path

Will the regular rolling upgrade process work with these changes?

By default, if the new geode.working-dir  property is not set, Geode will behave as it currently does. Users who do not set this property will experience no change.

If the user specifies a geode.working-dir other than the JVM's working directory, I do not know how the rolling upgrade process would be affected.

How do the proposed changes impact backwards-compatibility? Are message or file formats changing?

By default, if the new geode.working-dir  property is not set, Geode will behave as it currently does. Users who do not set this property will experience no change.

If the user specifies a geode.working-dir other than the JVM's working directory, I do not know how the backwards-compatibility would be affected.

Is there a need for a deprecation process to provide an upgrade path to users who will need to adjust their applications?

I believe that the only necessary change is to our documentation, so that if 

Prior Art

What would be the alternatives to the proposed solution? What would happen if we don’t solve the problem? Why should this proposal be preferred?

FAQ

Answers to questions you’ve commonly been asked after requesting comments for this proposal.

Errata

What are minor adjustments that had to be made to the proposal since it was approved?

  • No labels