Skip to content

Conversation

@poojav25
Copy link
Contributor

No description provided.

@@ -0,0 +1,119 @@
package nsxt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we place this in another package? nsxt is already overloaded

@@ -0,0 +1,139 @@
terraform {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be part of the PR

@@ -0,0 +1,79 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be part of the PR

@@ -0,0 +1,7 @@
TIMESTAMP VPC_COUNT SUBNET_COUNT PLAN_SECONDS APPLY_SECONDS STATUS PLAN CACHE_ENABLED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be part of the PR


type cache struct {
mu sync.RWMutex
data map[string]map[string]*data.StructValue //key: query , key DisplayName and objects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mutex here is for the entire cache - I think that this is inefficient.
IMO data here can be a `map[string]
Where struct contains the map and a mutex - we have no issue with access to the cache of VpcSubnet while accessing the cache of some other type.
I guess that this will require some changes though as data is keyed by query string - IDK if this is doable.

}

// SetCacheEnabled allows enabling/disabling cache for benchmarking
var cacheEnabled = os.Getenv("NSXT_ENABLE_CACHE") == "true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be also enabled/disabled by a provider-level attribute - you can use allow_unverified_ssl as an example for how to use both environment var and a provider attribute for activation

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.

3 participants